var T, baidu = T = baidu || {
    version: "1.5.2"
};
baidu.guid = "$BAIDU$";
baidu.$$ = window[baidu.guid] = window[baidu.guid] || {
    global: {}
};
baidu.ajax = baidu.ajax || {};
baidu.fn = baidu.fn || {};
baidu.fn.blank = function () { };
baidu.ajax.request = function (F, B) {
    var H = B || {},
    u = H.data || "",
    E = !(H.async === false),
    G = H.username || "",
    K = H.password || "",
    I = (H.method || "GET").toUpperCase(),
    J = H.headers || {},
    C = H.timeout || 0,
    A = {},
    x,
    t,
    D;
    function y() {
        if (D.readyState == 4) {
            try {
                var a = D.status
            } catch (b) {
                v("failure");
                return
            }
            v(a);
            if ((a >= 200 && a < 300) || a == 304 || a == 1223) {
                v("success")
            } else {
                v("failure")
            }
            window.setTimeout(function () {
                D.onreadystatechange = baidu.fn.blank;
                if (E) {
                    D = null
                }
            },
            0)
        }
    }
    function z() {
        if (window.ActiveXObject) {
            try {
                return new ActiveXObject("Msxml2.XMLHTTP")
            } catch (a) {
                try {
                    return new ActiveXObject("Microsoft.XMLHTTP")
                } catch (a) { }
            }
        }
        if (window.XMLHttpRequest) {
            return new XMLHttpRequest()
        }
    }
    function v(b) {
        b = "on" + b;
        var c = A[b],
        a = baidu.ajax[b];
        if (c) {
            if (x) {
                clearTimeout(x)
            }
            if (b != "onsuccess") {
                c(D)
            } else {
                try {
                    D.responseText
                } catch (d) {
                    return c(D)
                }
                c(D, D.responseText)
            }
        } else {
            if (a) {
                if (b == "onsuccess") {
                    return
                }
                a(D)
            }
        }
    }
    for (t in H) {
        A[t] = H[t]
    }
    J["X-Requested-With"] = "XMLHttpRequest";
    try {
        D = z();
        if (I == "GET") {
            if (u) {
                F += (F.indexOf("?") >= 0 ? "&" : "?") + u;
                u = null
            }
            if (H.noCache) {
                F += (F.indexOf("?") >= 0 ? "&" : "?") + "b" + (+new Date) + "=1"
            }
        }
        if (G) {
            D.open(I, F, E, G, K)
        } else {
            D.open(I, F, E)
        }
        if (E) {
            D.onreadystatechange = y
        }
        if (I == "POST") {
            D.setRequestHeader("Content-Type", (J["Content-Type"] || "application/x-www-form-urlencoded"))
        }
        for (t in J) {
            if (J.hasOwnProperty(t)) {
                D.setRequestHeader(t, J[t])
            }
        }
        v("beforerequest");
        if (C) {
            x = setTimeout(function () {
                D.onreadystatechange = baidu.fn.blank;
                D.abort();
                v("timeout")
            },
            C)
        }
        D.send(u);
        if (!E) {
            y()
        }
    } catch (w) {
        v("failure")
    }
    return D
};
baidu.url = baidu.url || {};
baidu.url.escapeSymbol = function (b) {
    return String(b).replace(/[#%&+=\/\\\ \　\f\r\n\t]/g,
    function (a) {
        return "%" + (256 + a.charCodeAt()).toString(16).substring(1).toUpperCase()
    })
};
baidu.ajax.form = function (N, L) {
    L = L || {};
    var I = N.elements,
    B = I.length,
    M = N.getAttribute("method"),
    J = N.getAttribute("action"),
    v = L.replacer ||
    function (a, b) {
        return a
    },
    y = {},
    w = [],
    D,
    z,
    x,
    C,
    K,
    H,
    G,
    E,
    F;
    function A(b, a) {
        w.push(b + "=" + a)
    }
    for (D in L) {
        if (L.hasOwnProperty(D)) {
            y[D] = L[D]
        }
    }
    for (D = 0; D < B; D++) {
        z = I[D];
        C = z.name;
        if (!z.disabled && C) {
            x = z.type;
            K = baidu.url.escapeSymbol(z.value);
            switch (x) {
                case "radio":
                case "checkbox":
                    if (!z.checked) {
                        break
                    }
                case "textarea":
                case "text":
                case "password":
                case "hidden":
                case "select-one":
                    A(C, v(K, C));
                    break;
                case "select-multiple":
                    H = z.options;
                    E = H.length;
                    for (G = 0; G < E; G++) {
                        F = H[G];
                        if (F.selected) {
                            A(C, v(F.value, C))
                        }
                    }
                    break
            }
        }
    }
    y.data = w.join("&");
    y.method = N.getAttribute("method") || "GET";
    return baidu.ajax.request(J, y)
};
baidu.ajax.get = function (c, d) {
    return baidu.ajax.request(c, {
        onsuccess: d
    })
};
baidu.ajax.post = function (d, g, f) {
    return baidu.ajax.request(d, {
        onsuccess: f,
        method: "POST",
        data: g
    })
};
baidu.array = baidu.array || {};
baidu.array.indexOf = function (j, g, k) {
    var h = j.length,
    l = g;
    k = k | 0;
    if (k < 0) {
        k = Math.max(0, h + k)
    }
    for (; k < h; k++) {
        if (k in j && j[k] === g) {
            return k
        }
    }
    return -1
};
baidu.array.contains = function (d, c) {
    return (baidu.array.indexOf(d, c) >= 0)
};
baidu.each = baidu.array.forEach = baidu.array.each = function (l, n, j) {
    var o, m, p, k = l.length;
    if ("function" == typeof n) {
        for (p = 0; p < k; p++) {
            m = l[p];
            o = n.call(j || l, m, p);
            if (o === false) {
                break
            }
        }
    }
    return l
};
baidu.array.empty = function (b) {
    b.length = 0
};
baidu.array.every = function (j, k, g) {
    var l = 0,
    h = j.length;
    for (; l < h; l++) {
        if (l in j && !k.call(g || j, j[l], l)) {
            return false
        }
    }
    return true
};
baidu.array.filter = function (m, o, q) {
    var r = [],
    k = 0,
    l = m.length,
    n,
    p;
    if ("function" == typeof o) {
        for (p = 0; p < l; p++) {
            n = m[p];
            if (true === o.call(q || m, n, p)) {
                r[k++] = n
            }
        }
    }
    return r
};
baidu.array.find = function (j, l) {
    var k, g, h = j.length;
    if ("function" == typeof l) {
        for (g = 0; g < h; g++) {
            k = j[g];
            if (true === l.call(j, k, g)) {
                return k
            }
        }
    }
    return null
};
baidu.array.hash = function (l, h) {
    var k = {},
    m = h && h.length,
    n = 0,
    j = l.length;
    for (; n < j; n++) {
        k[l[n]] = (m && m > n) ? h[n] : true
    }
    return k
};
baidu.array.lastIndexOf = function (h, f, j) {
    var g = h.length;
    j = j | 0;
    if (!j || j >= g) {
        j = g - 1
    }
    if (j < 0) {
        j += g
    }
    for (; j >= 0; j--) {
        if (j in h && h[j] === f) {
            return j
        }
    }
    return -1
};
baidu.array.map = function (k, l, h) {
    var m = [],
    n = 0,
    j = k.length;
    for (; n < j; n++) {
        m[n] = l.call(h || k, k[n], n)
    }
    return m
};
baidu.array.reduce = function (k, n, m) {
    var h = 0,
    j = k.length,
    l = 0;
    if (arguments.length < 3) {
        for (; h < j; h++) {
            m = k[h++];
            l = 1;
            break
        }
        if (!l) {
            return
        }
    }
    for (; h < j; h++) {
        if (h in k) {
            m = n(m, k[h], h, k)
        }
    }
    return m
};
baidu.array.remove = function (g, d) {
    var f = g.length;
    while (f--) {
        if (f in g && g[f] === d) {
            g.splice(f, 1)
        }
    }
    return g
};
baidu.array.removeAt = function (c, d) {
    return c.splice(d, 1)[0]
};
baidu.array.some = function (j, k, g) {
    var l = 0,
    h = j.length;
    for (; l < h; l++) {
        if (l in j && k.call(g || j, j[l], l)) {
            return true
        }
    }
    return false
};
baidu.array.unique = function (l, k) {
    var h = l.length,
    j = l.slice(0),
    m,
    n;
    if ("function" != typeof k) {
        k = function (a, b) {
            return a === b
        }
    }
    while (--h > 0) {
        n = j[h];
        m = h;
        while (m--) {
            if (k(n, j[m])) {
                j.splice(h, 1);
                break
            }
        }
    }
    return j
};
baidu.async = baidu.async || {};
baidu.object = baidu.object || {};
baidu.extend = baidu.object.extend = function (g, f) {
    for (var d in f) {
        if (f.hasOwnProperty(d)) {
            g[d] = f[d]
        }
    }
    return g
};
baidu.lang = baidu.lang || {};
baidu.lang.isFunction = function (b) {
    return "[object Function]" == Object.prototype.toString.call(b)
};
baidu.async._isDeferred = function (c) {
    var d = baidu.lang.isFunction;
    return c && d(c.success) && d(c.then) && d(c.fail) && d(c.cancel)
};
baidu.async.Deferred = function () {
    var c = this;
    baidu.extend(c, {
        _fired: 0,
        _firing: 0,
        _cancelled: 0,
        _resolveChain: [],
        _rejectChain: [],
        _result: [],
        _isError: 0
    });
    function d() {
        if (c._cancelled || c._firing) {
            return
        }
        if (c._nextDeferred) {
            c._nextDeferred.then(c._resolveChain[0], c._rejectChain[0]);
            return
        }
        c._firing = 1;
        var a = c._isError ? c._rejectChain : c._resolveChain,
        j = c._result[c._isError ? 1 : 0];
        while (a[0] && (!c._cancelled)) {
            try {
                var h = a.shift().call(c, j);
                if (baidu.async._isDeferred(h)) {
                    c._nextDeferred = h; [].push.apply(h._resolveChain, c._resolveChain); [].push.apply(h._rejectChain, c._rejectChain);
                    a = c._resolveChain = [];
                    c._rejectChain = []
                }
            } catch (b) {
                throw b
            } finally {
                c._fired = 1;
                c._firing = 0
            }
        }
    }
    c.resolve = c.fireSuccess = function (a) {
        c._result[0] = a;
        d();
        return c
    };
    c.reject = c.fireFail = function (a) {
        c._result[1] = a;
        c._isError = 1;
        d();
        return c
    };
    c.then = function (b, a) {
        c._resolveChain.push(b);
        c._rejectChain.push(a);
        if (c._fired) {
            d()
        }
        return c
    };
    c.success = function (a) {
        return c.then(a, baidu.fn.blank)
    };
    c.fail = function (a) {
        return c.then(baidu.fn.blank, a)
    };
    c.cancel = function () {
        c._cancelled = 1
    }
};
baidu.async.get = function (c) {
    var d = new baidu.async.Deferred();
    baidu.ajax.request(c, {
        onsuccess: function (a, b) {
            d.resolve({
                xhr: a,
                responseText: b
            })
        },
        onfailure: function (a) {
            d.reject({
                xhr: a
            })
        }
    });
    return d
};
baidu.async.post = function (d, g) {
    var f = new baidu.async.Deferred();
    baidu.ajax.request(d, {
        method: "POST",
        data: g,
        onsuccess: function (a, b) {
            f.resolve({
                xhr: a,
                responseText: b
            })
        },
        onfailure: function (a) {
            f.reject({
                xhr: a
            })
        }
    });
    return f
};
baidu.async.when = function (j, f, h) {
    if (baidu.async._isDeferred(j)) {
        j.then(f, h);
        return j
    }
    var g = new baidu.async.Deferred();
    g.then(f, h).resolve(j);
    return g
};
baidu.browser = baidu.browser || {};
baidu.browser.chrome = /chrome\/(\d+\.\d+)/i.test(navigator.userAgent) ? +RegExp["\x241"] : undefined;
baidu.browser.firefox = /firefox\/(\d+\.\d+)/i.test(navigator.userAgent) ? +RegExp["\x241"] : undefined;
baidu.browser.ie = baidu.ie = /msie (\d+\.\d+)/i.test(navigator.userAgent) ? (document.documentMode || +RegExp["\x241"]) : undefined;
baidu.browser.isGecko = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent);
baidu.browser.isStrict = document.compatMode == "CSS1Compat";
baidu.browser.isWebkit = /webkit/i.test(navigator.userAgent);
try {
    if (/(\d+\.\d+)/.test(external.max_version)) {
        baidu.browser.maxthon = +RegExp["\x241"]
    }
} catch (e) { }
baidu.browser.opera = /opera(\/| )(\d+(\.\d+)?)(.+?(version\/(\d+(\.\d+)?)))?/i.test(navigator.userAgent) ? +(RegExp["\x246"] || RegExp["\x242"]) : undefined; (function () {
    var b = navigator.userAgent;
    baidu.browser.safari = /(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(b) && !/chrome/i.test(b) ? +(RegExp["\x241"] || RegExp["\x242"]) : undefined
})();
baidu.cookie = baidu.cookie || {};
baidu.cookie._isValidKey = function (b) {
    return (new RegExp('^[^\\x00-\\x20\\x7f\\(\\)<>@,;:\\\\\\"\\[\\]\\?=\\{\\}\\/\\u0080-\\uffff]+\x24')).test(b)
};
baidu.cookie.getRaw = function (d) {
    if (baidu.cookie._isValidKey(d)) {
        var g = new RegExp("(^| )" + d + "=([^;]*)(;|\x24)"),
        f = g.exec(document.cookie);
        if (f) {
            return f[2] || null
        }
    }
    return null
};
baidu.cookie.get = function (d) {
    var c = baidu.cookie.getRaw(d);
    if ("string" == typeof c) {
        c = decodeURIComponent(c);
        return c
    }
    return null
};
baidu.cookie.setRaw = function (j, h, f) {
    if (!baidu.cookie._isValidKey(j)) {
        return
    }
    f = f || {};
    var g = f.expires;
    if ("number" == typeof f.expires) {
        g = new Date();
        g.setTime(g.getTime() + f.expires)
    }
    document.cookie = j + "=" + h + (f.path ? "; path=" + f.path : "") + (g ? "; expires=" + g.toGMTString() : "") + (f.domain ? "; domain=" + f.domain : "") + (f.secure ? "; secure" : "")
};
baidu.cookie.remove = function (c, d) {
    d = d || {};
    d.expires = new Date(0);
    baidu.cookie.setRaw(c, "", d)
};
baidu.cookie.set = function (d, g, f) {
    baidu.cookie.setRaw(d, encodeURIComponent(g), f)
};
baidu.date = baidu.date || {};
baidu.number = baidu.number || {};
baidu.number.pad = function (k, l) {
    var j = "",
    g = (k < 0),
    h = String(Math.abs(k));
    if (h.length < l) {
        j = (new Array(l - h.length + 1)).join("0")
    }
    return (g ? "-" : "") + j + h
};
baidu.date.format = function (v, p) {
    if ("string" != typeof p) {
        return v.toString()
    }
    function r(a, b) {
        p = p.replace(a, b)
    }
    var u = baidu.number.pad,
    o = v.getFullYear(),
    q = v.getMonth() + 1,
    l = v.getDate(),
    n = v.getHours(),
    t = v.getMinutes(),
    m = v.getSeconds();
    r(/yyyy/g, u(o, 4));
    r(/yy/g, u(parseInt(o.toString().slice(2), 10), 2));
    r(/MM/g, u(q, 2));
    r(/M/g, q);
    r(/dd/g, u(l, 2));
    r(/d/g, l);
    r(/HH/g, u(n, 2));
    r(/H/g, n);
    r(/hh/g, u(n % 12, 2));
    r(/h/g, n % 12);
    r(/mm/g, u(t, 2));
    r(/m/g, t);
    r(/ss/g, u(m, 2));
    r(/s/g, m);
    return p
};
baidu.date.parse = function (l) {
    var h = new RegExp("^\\d+(\\-|\\/)\\d+(\\-|\\/)\\d+\x24");
    if ("string" == typeof l) {
        if (h.test(l) || isNaN(Date.parse(l))) {
            var j = l.split(/ |T/),
            d = j.length > 1 ? j[1].split(/[^\d]/) : [0, 0, 0],
            k = j[0].split(/[^\d]/);
            return new Date(k[0] - 0, k[1] - 1, k[2] - 0, d[0] - 0, d[1] - 0, d[2] - 0)
        } else {
            return new Date(l)
        }
    }
    return new Date()
};
baidu.dom = baidu.dom || {};
baidu.dom.g = function (b) {
    if (!b) {
        return null
    }
    if ("string" == typeof b || b instanceof String) {
        return document.getElementById(b)
    } else {
        if (b.nodeName && (b.nodeType == 1 || b.nodeType == 9)) {
            return b
        }
    }
    return null
};
baidu.g = baidu.G = baidu.dom.g;
baidu.string = baidu.string || {}; (function () {
    var b = new RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+\x24)", "g");
    baidu.string.trim = function (a) {
        return String(a).replace(b, "")
    }
})();
baidu.trim = baidu.string.trim;
baidu.dom.addClass = function (m, l) {
    m = baidu.dom.g(m);
    var j = l.split(/\s+/),
    k = m.className,
    n = " " + k + " ",
    o = 0,
    p = j.length;
    for (; o < p; o++) {
        if (n.indexOf(" " + j[o] + " ") < 0) {
            k += (k ? " " : "") + j[o]
        }
    }
    m.className = k;
    return m
};
baidu.addClass = baidu.dom.addClass;
baidu.dom.children = function (d) {
    d = baidu.dom.g(d);
    for (var f = [], g = d.firstChild; g; g = g.nextSibling) {
        if (g.nodeType == 1) {
            f.push(g)
        }
    }
    return f
};
baidu.lang.isString = function (b) {
    return "[object String]" == Object.prototype.toString.call(b)
};
baidu.isString = baidu.lang.isString;
baidu.dom._g = function (b) {
    if (baidu.lang.isString(b)) {
        return document.getElementById(b)
    }
    return b
};
baidu._g = baidu.dom._g;
baidu.dom.contains = function (f, d) {
    var g = baidu.dom._g;
    f = g(f);
    d = g(d);
    return f.contains ? f != d && f.contains(d) : !!(f.compareDocumentPosition(d) & 16)
};
baidu.dom._NAME_ATTRS = (function () {
    var b = {
        cellpadding: "cellPadding",
        cellspacing: "cellSpacing",
        colspan: "colSpan",
        rowspan: "rowSpan",
        valign: "vAlign",
        usemap: "useMap",
        frameborder: "frameBorder"
    };
    if (baidu.browser.ie < 8) {
        b["for"] = "htmlFor";
        b["class"] = "className"
    } else {
        b.htmlFor = "for";
        b.className = "class"
    }
    return b
})();
baidu.dom.setAttr = function (d, f, g) {
    d = baidu.dom.g(d);
    if ("style" == f) {
        d.style.cssText = g
    } else {
        f = baidu.dom._NAME_ATTRS[f] || f;
        d.setAttribute(f, g)
    }
    return d
};
baidu.setAttr = baidu.dom.setAttr;
baidu.dom.setAttrs = function (g, f) {
    g = baidu.dom.g(g);
    for (var d in f) {
        baidu.dom.setAttr(g, d, f[d])
    }
    return g
};
baidu.setAttrs = baidu.dom.setAttrs;
baidu.dom.create = function (j, g) {
    var h = document.createElement(j),
    f = g || {};
    return baidu.dom.setAttrs(h, f)
};
baidu.lang.guid = function () {
    return "TANGRAM$" + baidu.$$._counter++
};
baidu.$$._counter = baidu.$$._counter || 1;
baidu.lang.Class = function () {
    this.guid = baidu.lang.guid(); !this.__decontrolled && (baidu.$$._instances[this.guid] = this)
};
baidu.$$._instances = baidu.$$._instances || {};
baidu.lang.Class.prototype.dispose = function () {
    delete baidu.$$._instances[this.guid];
    for (var b in this) {
        typeof this[b] != "function" && delete this[b]
    }
    this.disposed = true
};
baidu.lang.Class.prototype.toString = function () {
    return "[object " + (this.__type || this._className || "Object") + "]"
};
window.baiduInstance = function (b) {
    return baidu.$$._instances[b]
};
baidu.lang.Class.prototype.un = baidu.lang.Class.prototype.removeEventListener = function (h, j) {
    var f, g = this.__listeners;
    if (!g) {
        return
    }
    if (typeof h == "undefined") {
        for (f in g) {
            delete g[f]
        }
        return
    }
    h.indexOf("on") && (h = "on" + h);
    if (typeof j == "undefined") {
        delete g[h]
    } else {
        if (g[h]) {
            typeof j == "string" && (j = g[h][j]) && delete g[h][j];
            for (f = g[h].length - 1; f >= 0; f--) {
                if (g[h][f] === j) {
                    g[h].splice(f, 1)
                }
            }
        }
    }
};
baidu.lang.Event = function (d, c) {
    this.type = d;
    this.returnValue = true;
    this.target = c || null;
    this.currentTarget = null
};
baidu.lang.Class.prototype.fire = baidu.lang.Class.prototype.dispatchEvent = function (n, k) {
    baidu.lang.isString(n) && (n = new baidu.lang.Event(n)); !this.__listeners && (this.__listeners = {});
    k = k || {};
    for (var p in k) {
        n[p] = k[p]
    }
    var p, l, o = this,
    j = o.__listeners,
    m = n.type;
    n.target = n.target || (n.currentTarget = o);
    m.indexOf("on") && (m = "on" + m);
    typeof o[m] == "function" && o[m].apply(o, arguments);
    if (typeof j[m] == "object") {
        for (p = 0, l = j[m].length; p < l; p++) {
            j[m][p] && j[m][p].apply(o, arguments)
        }
    }
    return n.returnValue
};
baidu.lang.Class.prototype.on = baidu.lang.Class.prototype.addEventListener = function (j, k, l) {
    if (typeof k != "function") {
        return
    } !this.__listeners && (this.__listeners = {});
    var g, h = this.__listeners;
    j.indexOf("on") && (j = "on" + j);
    typeof h[j] != "object" && (h[j] = []);
    for (g = h[j].length - 1; g >= 0; g--) {
        if (h[j][g] === k) {
            return k
        }
    }
    h[j].push(k);
    l && typeof l == "string" && (h[j][l] = k);
    return k
};
baidu.lang.createSingle = function (c) {
    var g = new baidu.lang.Class();
    for (var f in c) {
        g[f] = c[f]
    }
    return g
};
baidu.dom.ddManager = baidu.lang.createSingle({
    _targetsDroppingOver: {}
});
baidu.dom.getDocument = function (b) {
    b = baidu.dom.g(b);
    return b.nodeType == 9 ? b : b.ownerDocument || b.document
};
baidu.dom.getComputedStyle = function (f, g) {
    f = baidu.dom._g(f);
    var h = baidu.dom.getDocument(f),
    j;
    if (h.defaultView && h.defaultView.getComputedStyle) {
        j = h.defaultView.getComputedStyle(f, null);
        if (j) {
            return j[g] || j.getPropertyValue(g)
        }
    }
    return ""
};
baidu.dom._styleFixer = baidu.dom._styleFixer || {};
baidu.dom._styleFilter = baidu.dom._styleFilter || [];
baidu.dom._styleFilter.filter = function (h, l, k) {
    for (var j = 0,
    m = baidu.dom._styleFilter,
    n; n = m[j]; j++) {
        if (n = n[k]) {
            l = n(h, l)
        }
    }
    return l
};
baidu.string.toCamelCase = function (b) {
    if (b.indexOf("-") < 0 && b.indexOf("_") < 0) {
        return b
    }
    return b.replace(/[-_][^-_]/g,
    function (a) {
        return a.charAt(1).toUpperCase()
    })
};
baidu.dom.getStyle = function (l, g) {
    var j = baidu.dom;
    l = j.g(l);
    g = baidu.string.toCamelCase(g);
    var k = l.style[g] || (l.currentStyle ? l.currentStyle[g] : "") || j.getComputedStyle(l, g);
    if (!k) {
        var h = j._styleFixer[g];
        if (h) {
            k = h.get ? h.get(l) : baidu.dom.getStyle(l, h)
        }
    }
    if (h = j._styleFilter) {
        k = h.filter(g, k, "get")
    }
    return k
};
baidu.getStyle = baidu.dom.getStyle;
baidu.event = baidu.event || {};
baidu.event._listeners = baidu.event._listeners || [];
baidu.event.on = function (j, o, m) {
    o = o.replace(/^on/i, "");
    j = baidu.dom._g(j);
    var n = function (a) {
        m.call(j, a)
    },
    k = baidu.event._listeners,
    p = baidu.event._eventFilter,
    l,
    q = o;
    o = o.toLowerCase();
    if (p && p[o]) {
        l = p[o](j, o, n);
        q = l.type;
        n = l.listener
    }
    if (j.addEventListener) {
        j.addEventListener(q, n, false)
    } else {
        if (j.attachEvent) {
            j.attachEvent("on" + q, n)
        }
    }
    k[k.length] = [j, o, m, n, q];
    return j
};
baidu.on = baidu.event.on;
baidu.event.un = function (q, n, r) {
    q = baidu.dom._g(q);
    n = n.replace(/^on/i, "").toLowerCase();
    var k = baidu.event._listeners,
    p = k.length,
    o = !r,
    l, m, t;
    while (p--) {
        l = k[p];
        if (l[1] === n && l[0] === q && (o || l[2] === r)) {
            m = l[4];
            t = l[3];
            if (q.removeEventListener) {
                q.removeEventListener(m, t, false)
            } else {
                if (q.detachEvent) {
                    q.detachEvent("on" + m, t)
                }
            }
            k.splice(p, 1)
        }
    }
    return q
};
baidu.un = baidu.event.un;
baidu.event.preventDefault = function (b) {
    if (b.preventDefault) {
        b.preventDefault()
    } else {
        b.returnValue = false
    }
};
baidu.page = baidu.page || {};
baidu.page.getScrollTop = function () {
    var b = document;
    return window.pageYOffset || b.documentElement.scrollTop || b.body.scrollTop
};
baidu.page.getScrollLeft = function () {
    var b = document;
    return window.pageXOffset || b.documentElement.scrollLeft || b.body.scrollLeft
}; (function () {
    baidu.page.getMousePosition = function () {
        return {
            x: baidu.page.getScrollLeft() + b.x,
            y: baidu.page.getScrollTop() + b.y
        }
    };
    var b = {
        x: 0,
        y: 0
    };
    baidu.event.on(document, "onmousemove",
    function (a) {
        a = window.event || a;
        b.x = a.clientX;
        b.y = a.clientY
    })
})();
baidu.dom.getPosition = function (z) {
    z = baidu.dom.g(z);
    var p = baidu.dom.getDocument(z),
    w = baidu.browser,
    t = baidu.dom.getStyle,
    x = w.isGecko > 0 && p.getBoxObjectFor && t(z, "position") == "absolute" && (z.style.top === "" || z.style.left === ""),
    r = {
        left: 0,
        top: 0
    },
    u = (w.ie && !w.isStrict) ? p.body : p.documentElement,
    o,
    y;
    if (z == u) {
        return r
    }
    if (z.getBoundingClientRect) {
        y = z.getBoundingClientRect();
        r.left = Math.floor(y.left) + Math.max(p.documentElement.scrollLeft, p.body.scrollLeft);
        r.top = Math.floor(y.top) + Math.max(p.documentElement.scrollTop, p.body.scrollTop);
        r.left -= p.documentElement.clientLeft;
        r.top -= p.documentElement.clientTop;
        var q = p.body,
        n = parseInt(t(q, "borderLeftWidth")),
        v = parseInt(t(q, "borderTopWidth"));
        if (w.ie && !w.isStrict) {
            r.left -= isNaN(n) ? 2 : n;
            r.top -= isNaN(v) ? 2 : v
        }
    } else {
        o = z;
        do {
            r.left += o.offsetLeft;
            r.top += o.offsetTop;
            if (w.isWebkit > 0 && t(o, "position") == "fixed") {
                r.left += p.body.scrollLeft;
                r.top += p.body.scrollTop;
                break
            }
            o = o.offsetParent
        } while (o && o != z);
        if (w.opera > 0 || (w.isWebkit > 0 && t(z, "position") == "absolute")) {
            r.top -= p.body.offsetTop
        }
        o = z.offsetParent;
        while (o && o != p.body) {
            r.left -= o.scrollLeft;
            if (!w.opera || o.tagName != "TR") {
                r.top -= o.scrollTop
            }
            o = o.offsetParent
        }
    }
    return r
};
baidu.dom.setStyle = function (l, g, k) {
    var j = baidu.dom,
    h;
    l = j.g(l);
    g = baidu.string.toCamelCase(g);
    if (h = j._styleFilter) {
        k = h.filter(g, k, "set")
    }
    h = j._styleFixer[g]; (h && h.set) ? h.set(l, k) : (l.style[h || g] = k);
    return l
};
baidu.setStyle = baidu.dom.setStyle; (function () {
    var v, D, H, I, A, J, w, x, t, G, K = baidu.lang.isFunction,
    C, y, F;
    baidu.dom.drag = function (b, c) {
        t = x = null;
        if (!(v = baidu.dom.g(b))) {
            return false
        }
        D = baidu.object.extend({
            autoStop: true,
            capture: true,
            interval: 16,
            handler: v
        },
        c);
        y = baidu.dom.getPosition(v.offsetParent);
        F = baidu.dom.getPosition(v);
        if (baidu.getStyle(v, "position") == "absolute") {
            A = F.top - (v.offsetParent == document.body ? 0 : y.top);
            J = F.left - (v.offsetParent == document.body ? 0 : y.left)
        } else {
            A = parseFloat(baidu.getStyle(v, "top")) || -parseFloat(baidu.getStyle(v, "bottom")) || 0;
            J = parseFloat(baidu.getStyle(v, "left")) || -parseFloat(baidu.getStyle(v, "right")) || 0
        }
        if (D.mouseEvent) {
            H = baidu.page.getScrollLeft() + D.mouseEvent.clientX;
            I = baidu.page.getScrollTop() + D.mouseEvent.clientY
        } else {
            var a = baidu.page.getMousePosition();
            H = a.x;
            I = a.y
        }
        D.autoStop && baidu.event.on(D.handler, "mouseup", z);
        D.autoStop && baidu.event.on(window, "mouseup", z);
        baidu.event.on(document, "selectstart", B);
        if (D.capture && D.handler.setCapture) {
            D.handler.setCapture()
        } else {
            if (D.capture && window.captureEvents) {
                window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP)
            }
        }
        w = document.body.style.MozUserSelect;
        document.body.style.MozUserSelect = "none";
        if (K(D.ondragstart)) {
            D.ondragstart(v, D)
        }
        C = setInterval(u, D.interval);
        return {
            stop: z,
            update: E
        }
    };
    function E(a) {
        baidu.extend(D, a)
    }
    function z() {
        clearInterval(C);
        G = false;
        if (D.capture && D.handler.releaseCapture) {
            D.handler.releaseCapture()
        } else {
            if (D.capture && window.releaseEvents) {
                window.releaseEvents(Event.MOUSEMOVE | Event.MOUSEUP)
            }
        }
        document.body.style.MozUserSelect = w;
        baidu.event.un(document, "selectstart", B);
        D.autoStop && baidu.event.un(D.handler, "mouseup", z);
        D.autoStop && baidu.event.un(window, "mouseup", z);
        if (K(D.ondragend)) {
            D.ondragend(v, D)
        }
    }
    function u(a) {
        var f = D.range,
        b = baidu.page.getMousePosition(),
        d = J + b.x - H,
        c = A + b.y - I;
        if (typeof f == "object" && f && f.length == 4) {
            d = Math.max(f[3], d);
            d = Math.min(f[1] - v.offsetWidth, d);
            c = Math.max(f[0], c);
            c = Math.min(f[2] - v.offsetHeight, c)
        }
        if (!G) {
            baidu.setStyle(v, "marginTop", 0);
            baidu.setStyle(v, "marginLeft", 0);
            G = true
        }
        v.style.top = c + "px";
        v.style.left = d + "px";
        if ((x !== d || t !== c) && (x !== null || t !== null)) {
            if (K(D.ondrag)) {
                D.ondrag(v, D)
            }
        }
        x = d;
        t = c
    }
    function B(a) {
        return baidu.event.preventDefault(a, false)
    }
})();
baidu.dom.draggable = function (v, m) {
    m = baidu.object.extend({
        toggle: function () {
            return true
        }
    },
    m || {});
    m.autoStop = true;
    v = baidu.dom.g(v);
    m.handler = m.handler || v;
    var w, o = ["ondragstart", "ondrag", "ondragend"],
    u = o.length - 1,
    t,
    n,
    q = {
        dispose: function () {
            n && n.stop();
            baidu.event.un(m.handler, "onmousedown", p);
            baidu.lang.Class.prototype.dispose.call(q)
        }
    },
    r = this;
    if (w = baidu.dom.ddManager) {
        for (; u >= 0; u--) {
            t = o[u];
            m[t] = (function (b) {
                var a = m[b];
                return function () {
                    baidu.lang.isFunction(a) && a.apply(r, arguments);
                    w.dispatchEvent(b, {
                        DOM: v
                    })
                }
            })(t)
        }
    }
    if (v) {
        function p(a) {
            var b = m.mouseEvent = window.event || a;
            if (b.button > 1 || (baidu.lang.isFunction(m.toggle) && !m.toggle())) {
                return
            }
            if (baidu.dom.getStyle(v, "position") == "static") {
                baidu.dom.setStyle(v, "position", "relative")
            }
            if (baidu.lang.isFunction(m.onbeforedragstart)) {
                m.onbeforedragstart(v)
            }
            n = baidu.dom.drag(v, m);
            q.stop = n.stop;
            q.update = n.update;
            baidu.event.preventDefault(b)
        }
        baidu.event.on(m.handler, "onmousedown", p)
    }
    return {
        cancel: function () {
            q.dispose()
        }
    }
};
baidu.dom.intersect = function (l, m) {
    var n = baidu.dom.g,
    o = baidu.dom.getPosition,
    k = Math.max,
    q = Math.min;
    l = n(l);
    m = n(m);
    var p = o(l),
    g = o(m);
    return k(p.left, g.left) <= q(p.left + l.offsetWidth, g.left + m.offsetWidth) && k(p.top, g.top) <= q(p.top + l.offsetHeight, g.top + m.offsetHeight)
};
baidu.dom.droppable = function (n, p) {
    p = p || {};
    var o = baidu.dom.ddManager,
    l = baidu.dom.g(n),
    j = baidu.lang.guid(),
    m = function (a) {
        var b = o._targetsDroppingOver,
        c = {
            trigger: a.DOM,
            reciever: l
        };
        if (baidu.dom.intersect(l, a.DOM)) {
            if (!b[j]) {
                (typeof p.ondropover == "function") && p.ondropover.call(l, c);
                o.dispatchEvent("ondropover", c);
                b[j] = true
            }
        } else {
            if (b[j]) {
                (typeof p.ondropout == "function") && p.ondropout.call(l, c);
                o.dispatchEvent("ondropout", c)
            }
            delete b[j]
        }
    },
    k = function (a) {
        var b = {
            trigger: a.DOM,
            reciever: l
        };
        if (baidu.dom.intersect(l, a.DOM)) {
            typeof p.ondrop == "function" && p.ondrop.call(l, b);
            o.dispatchEvent("ondrop", b)
        }
        delete o._targetsDroppingOver[j]
    };
    o.addEventListener("ondrag", m);
    o.addEventListener("ondragend", k);
    return {
        cancel: function () {
            o.removeEventListener("ondrag", m);
            o.removeEventListener("ondragend", k)
        }
    }
};
baidu.dom.empty = function (b) {
    b = baidu.dom.g(b);
    while (b.firstChild) {
        b.removeChild(b.firstChild)
    }
    return b
};
baidu.dom._matchNode = function (g, j, h) {
    g = baidu.dom.g(g);
    for (var f = g[h]; f; f = f[j]) {
        if (f.nodeType == 1) {
            return f
        }
    }
    return null
};
baidu.dom.first = function (b) {
    return baidu.dom._matchNode(b, "nextSibling", "firstChild")
};
baidu.dom.getAttr = function (c, d) {
    c = baidu.dom.g(c);
    if ("style" == d) {
        return c.style.cssText
    }
    d = baidu.dom._NAME_ATTRS[d] || d;
    return c.getAttribute(d)
};
baidu.getAttr = baidu.dom.getAttr;
baidu.dom.setStyles = function (d, g) {
    d = baidu.dom.g(d);
    for (var f in g) {
        baidu.dom.setStyle(d, f, g[f])
    }
    return d
};
baidu.setStyles = baidu.dom.setStyles;
baidu.page.getViewHeight = function () {
    var c = document,
    d = c.compatMode == "BackCompat" ? c.body : c.documentElement;
    return d.clientHeight
};
baidu.page.getViewWidth = function () {
    var c = document,
    d = c.compatMode == "BackCompat" ? c.body : c.documentElement;
    return d.clientWidth
};
baidu.dom._styleFilter[baidu.dom._styleFilter.length] = {
    set: function (d, c) {
        if (c.constructor == Number && !/zIndex|fontWeight|opacity|zoom|lineHeight/i.test(d)) {
            c = c + "px"
        }
        return c
    }
};
baidu.dom.fixable = function (O, N) {
    var v = baidu.g(O),
    A = baidu.browser.ie && baidu.browser.ie <= 7 ? true : false,
    F = N.vertival || "top",
    x = N.horizontal || "left",
    y = typeof N.autofix != "undefined" ? N.autofix : true,
    G,
    L,
    H = false,
    D = N.onrender || new Function(),
    M = N.onupdate || new Function(),
    E = N.onrelease || new Function();
    if (!v) {
        return
    }
    G = I();
    L = {
        y: A ? (G.position == "static" ? baidu.dom.getPosition(v).top : baidu.dom.getPosition(v).top - baidu.dom.getPosition(v.parentNode).top) : v.offsetTop,
        x: A ? (G.position == "static" ? baidu.dom.getPosition(v).left : baidu.dom.getPosition(v).left - baidu.dom.getPosition(v.parentNode).left) : v.offsetLeft
    };
    baidu.extend(L, N.offset || {});
    y && w();
    function z() {
        return {
            top: F == "top" ? L.y : baidu.page.getViewHeight() - L.y - G.height,
            left: x == "left" ? L.x : baidu.page.getViewWidth() - L.x - G.width
        }
    }
    function C() {
        var a = z();
        v.style.setExpression("left", "eval((document.body.scrollLeft || document.documentElement.scrollLeft) + " + a.left + ") + 'px'");
        v.style.setExpression("top", "eval((document.body.scrollTop || document.documentElement.scrollTop) + " + a.top + ") + 'px'")
    }
    function I() {
        var a = {
            position: baidu.getStyle(v, "position"),
            height: function () {
                var b = baidu.getStyle(v, "height");
                return (b != "auto") ? (/\d+/.exec(b)[0]) : v.offsetHeight
            } (),
            width: function () {
                var b = baidu.getStyle(v, "width");
                return (b != "auto") ? (/\d+/.exec(b)[0]) : v.offsetWidth
            } ()
        };
        K("top", a);
        K("left", a);
        K("bottom", a);
        K("right", a);
        return a
    }
    function K(b, a) {
        var c;
        if (a.position == "static") {
            a[b] = ""
        } else {
            c = baidu.getStyle(v, b);
            if (c == "auto" || c == "0px") {
                a[b] = ""
            } else {
                a[b] = c
            }
        }
    }
    function w() {
        if (H) {
            return
        }
        baidu.setStyles(v, {
            top: "",
            left: "",
            bottom: "",
            right: ""
        });
        if (!A) {
            var a = {
                position: "fixed"
            };
            a[F == "top" ? "top" : "bottom"] = L.y + "px";
            a[x == "left" ? "left" : "right"] = L.x + "px";
            baidu.setStyles(v, a)
        } else {
            baidu.setStyle(v, "position", "absolute");
            C()
        }
        D();
        H = true
    }
    function B() {
        if (!H) {
            return
        }
        var a = {
            position: G.position,
            left: G.left == "" ? "auto" : G.left,
            top: G.top == "" ? "auto" : G.top,
            bottom: G.bottom == "" ? "auto" : G.bottom,
            right: G.right == "" ? "auto" : G.right
        };
        if (A) {
            v.style.removeExpression("left");
            v.style.removeExpression("top")
        }
        baidu.setStyles(v, a);
        E();
        H = false
    }
    function J(a) {
        if (!a) {
            return
        }
        D = a.onrender || D;
        M = a.onupdate || M;
        E = a.onrelease || E;
        F = a.vertival || "top";
        x = a.horizontal || "left";
        baidu.extend(L, a.offset || {});
        M()
    }
    return {
        render: w,
        update: J,
        release: B
    }
};
baidu.dom.getAncestorBy = function (d, c) {
    d = baidu.dom.g(d);
    while ((d = d.parentNode) && d.nodeType == 1) {
        if (c(d)) {
            return d
        }
    }
    return null
};
baidu.dom.getAncestorByClass = function (d, c) {
    d = baidu.dom.g(d);
    c = new RegExp("(^|\\s)" + baidu.string.trim(c) + "(\\s|\x24)");
    while ((d = d.parentNode) && d.nodeType == 1) {
        if (c.test(d.className)) {
            return d
        }
    }
    return null
};
baidu.dom.getAncestorByTag = function (c, d) {
    c = baidu.dom.g(c);
    d = d.toUpperCase();
    while ((c = c.parentNode) && c.nodeType == 1) {
        if (c.tagName == d) {
            return c
        }
    }
    return null
};
baidu.dom.getCurrentStyle = function (c, d) {
    c = baidu.dom.g(c);
    return c.style[d] || (c.currentStyle ? c.currentStyle[d] : "") || baidu.dom.getComputedStyle(c, d)
};
baidu.dom.getParent = function (b) {
    b = baidu.dom._g(b);
    return b.parentElement || b.parentNode || null
};
baidu.dom.getText = function (k) {
    var g = "",
    j, l = 0,
    h;
    k = baidu._g(k);
    if (k.nodeType === 3 || k.nodeType === 4) {
        g += k.nodeValue
    } else {
        if (k.nodeType !== 8) {
            j = k.childNodes;
            for (h = j.length; l < h; l++) {
                g += baidu.dom.getText(j[l])
            }
        }
    }
    return g
};
baidu.dom.getWindow = function (d) {
    d = baidu.dom.g(d);
    var c = baidu.dom.getDocument(d);
    return c.parentWindow || c.defaultView || null
};
baidu.dom.hasAttr = function (g, d) {
    g = baidu.g(g);
    var f = g.attributes.getNamedItem(d);
    return !!(f && f.specified)
};
baidu.dom.hasClass = function (j, h) {
    j = baidu.dom.g(j);
    if (!j || !j.className) {
        return false
    }
    var f = baidu.string.trim(h).split(/\s+/),
    g = f.length;
    h = j.className.split(/\s+/).join(" ");
    while (g--) {
        if (!(new RegExp("(^| )" + f[g] + "( |\x24)")).test(h)) {
            return false
        }
    }
    return true
};
baidu.dom.hide = function (b) {
    b = baidu.dom.g(b);
    b.style.display = "none";
    return b
};
baidu.hide = baidu.dom.hide;
baidu.dom.insertAfter = function (h, j) {
    var f, g;
    f = baidu.dom._g;
    h = f(h);
    j = f(j);
    g = j.parentNode;
    if (g) {
        g.insertBefore(h, j.nextSibling)
    }
    return h
};
baidu.dom.insertBefore = function (h, j) {
    var f, g;
    f = baidu.dom._g;
    h = f(h);
    j = f(j);
    g = j.parentNode;
    if (g) {
        g.insertBefore(h, j)
    }
    return h
};
baidu.dom.insertHTML = function (k, h, l) {
    k = baidu.dom.g(k);
    var g, j;
    if (k.insertAdjacentHTML && !baidu.browser.opera) {
        k.insertAdjacentHTML(h, l)
    } else {
        g = k.ownerDocument.createRange();
        h = h.toUpperCase();
        if (h == "AFTERBEGIN" || h == "BEFOREEND") {
            g.selectNodeContents(k);
            g.collapse(h == "AFTERBEGIN")
        } else {
            j = h == "BEFOREBEGIN";
            g[j ? "setStartBefore" : "setEndAfter"](k);
            g.collapse(j)
        }
        g.insertNode(g.createContextualFragment(l))
    }
    return k
};
baidu.insertHTML = baidu.dom.insertHTML;
baidu.dom.last = function (b) {
    return baidu.dom._matchNode(b, "previousSibling", "lastChild")
};
baidu.dom.next = function (b) {
    return baidu.dom._matchNode(b, "nextSibling", "nextSibling")
};
baidu.dom.opacity = function (c, d) {
    c = baidu.dom.g(c);
    if (!baidu.browser.ie) {
        c.style.opacity = d;
        c.style.KHTMLOpacity = d
    } else {
        c.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity:" + Math.floor(d * 100) + ")"
    }
};
baidu.dom.prev = function (b) {
    return baidu.dom._matchNode(b, "previousSibling", "previousSibling")
};
baidu.string.escapeReg = function (b) {
    return String(b).replace(new RegExp("([.*+?^=!:\x24{}()|[\\]/\\\\])", "g"), "\\\x241")
};
baidu.dom.q = function (m, p, t) {
    var l = [],
    q = baidu.string.trim,
    n,
    o,
    u,
    r;
    if (!(m = q(m))) {
        return l
    }
    if ("undefined" == typeof p) {
        p = document
    } else {
        p = baidu.dom.g(p);
        if (!p) {
            return l
        }
    }
    t && (t = q(t).toUpperCase());
    if (p.getElementsByClassName) {
        u = p.getElementsByClassName(m);
        n = u.length;
        for (o = 0; o < n; o++) {
            r = u[o];
            if (t && r.tagName != t) {
                continue
            }
            l[l.length] = r
        }
    } else {
        m = new RegExp("(^|\\s)" + baidu.string.escapeReg(m) + "(\\s|\x24)");
        u = t ? p.getElementsByTagName(t) : (p.all || p.getElementsByTagName("*"));
        n = u.length;
        for (o = 0; o < n; o++) {
            r = u[o];
            m.test(r.className) && (l[l.length] = r)
        }
    }
    return l
};
baidu.q = baidu.Q = baidu.dom.q; (function () {
    var G = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
    L = "sizcache" + (Math.random() + "").replace(".", ""),
    F = 0,
    C = Object.prototype.toString,
    M = false,
    N = true,
    D = /\\/g,
    z = /\r\n/g,
    x = /\W/; [0, 0].sort(function () {
        N = false;
        return 0
    });
    var P = function (b, n, r, q) {
        r = r || [];
        n = n || document;
        var o = n;
        if (n.nodeType !== 1 && n.nodeType !== 9) {
            return []
        }
        if (!b || typeof b !== "string") {
            return r
        }
        var j, l, f, k, m, g, h, t, c = true,
        d = P.isXML(n),
        a = [],
        p = b;
        do {
            G.exec("");
            j = G.exec(p);
            if (j) {
                p = j[3];
                a.push(j[1]);
                if (j[2]) {
                    k = j[3];
                    break
                }
            }
        } while (j);
        if (a.length > 1 && K.exec(b)) {
            if (a.length === 2 && J.relative[a[0]]) {
                l = B(a[0] + a[1], n, q)
            } else {
                l = J.relative[a[0]] ? [n] : P(a.shift(), n);
                while (a.length) {
                    b = a.shift();
                    if (J.relative[b]) {
                        b += a.shift()
                    }
                    l = B(b, l, q)
                }
            }
        } else {
            if (!q && a.length > 1 && n.nodeType === 9 && !d && J.match.ID.test(a[0]) && !J.match.ID.test(a[a.length - 1])) {
                m = P.find(a.shift(), n, d);
                n = m.expr ? P.filter(m.expr, m.set)[0] : m.set[0]
            }
            if (n) {
                m = q ? {
                    expr: a.pop(),
                    set: I(q)
                } : P.find(a.pop(), a.length === 1 && (a[0] === "~" || a[0] === "+") && n.parentNode ? n.parentNode : n, d);
                l = m.expr ? P.filter(m.expr, m.set) : m.set;
                if (a.length > 0) {
                    f = I(l)
                } else {
                    c = false
                }
                while (a.length) {
                    g = a.pop();
                    h = g;
                    if (!J.relative[g]) {
                        g = ""
                    } else {
                        h = a.pop()
                    }
                    if (h == null) {
                        h = n
                    }
                    J.relative[g](f, h, d)
                }
            } else {
                f = a = []
            }
        }
        if (!f) {
            f = l
        }
        if (!f) {
            P.error(g || b)
        }
        if (C.call(f) === "[object Array]") {
            if (!c) {
                r.push.apply(r, f)
            } else {
                if (n && n.nodeType === 1) {
                    for (t = 0; f[t] != null; t++) {
                        if (f[t] && (f[t] === true || f[t].nodeType === 1 && P.contains(n, f[t]))) {
                            r.push(l[t])
                        }
                    }
                } else {
                    for (t = 0; f[t] != null; t++) {
                        if (f[t] && f[t].nodeType === 1) {
                            r.push(l[t])
                        }
                    }
                }
            }
        } else {
            I(f, r)
        }
        if (k) {
            P(k, o, r, q);
            P.uniqueSort(r)
        }
        return r
    };
    P.uniqueSort = function (b) {
        if (E) {
            M = N;
            b.sort(E);
            if (M) {
                for (var a = 1; a < b.length; a++) {
                    if (b[a] === b[a - 1]) {
                        b.splice(a--, 1)
                    }
                }
            }
        }
        return b
    };
    P.matches = function (a, b) {
        return P(a, null, null, b)
    };
    P.matchesSelector = function (a, b) {
        return P(b, null, null, [a]).length > 0
    };
    P.find = function (k, h, j) {
        var a, f, c, d, b, g;
        if (!k) {
            return []
        }
        for (f = 0, c = J.order.length; f < c; f++) {
            b = J.order[f];
            if ((d = J.leftMatch[b].exec(k))) {
                g = d[1];
                d.splice(1, 1);
                if (g.substr(g.length - 1) !== "\\") {
                    d[1] = (d[1] || "").replace(D, "");
                    a = J.find[b](d, h, j);
                    if (a != null) {
                        k = k.replace(J.match[b], "");
                        break
                    }
                }
            }
        }
        if (!a) {
            a = typeof h.getElementsByTagName !== "undefined" ? h.getElementsByTagName("*") : []
        }
        return {
            set: a,
            expr: k
        }
    };
    P.filter = function (o, p, j, c) {
        var a, n, q, f, l, k, d, b, m, h = o,
        g = [],
        r = p,
        t = p && p[0] && P.isXML(p[0]);
        while (o && p.length) {
            for (q in J.filter) {
                if ((a = J.leftMatch[q].exec(o)) != null && a[2]) {
                    k = J.filter[q];
                    d = a[1];
                    n = false;
                    a.splice(1, 1);
                    if (d.substr(d.length - 1) === "\\") {
                        continue
                    }
                    if (r === g) {
                        g = []
                    }
                    if (J.preFilter[q]) {
                        a = J.preFilter[q](a, r, j, g, c, t);
                        if (!a) {
                            n = f = true
                        } else {
                            if (a === true) {
                                continue
                            }
                        }
                    }
                    if (a) {
                        for (b = 0; (l = r[b]) != null; b++) {
                            if (l) {
                                f = k(l, a, b, r);
                                m = c ^ f;
                                if (j && f != null) {
                                    if (m) {
                                        n = true
                                    } else {
                                        r[b] = false
                                    }
                                } else {
                                    if (m) {
                                        g.push(l);
                                        n = true
                                    }
                                }
                            }
                        }
                    }
                    if (f !== undefined) {
                        if (!j) {
                            r = g
                        }
                        o = o.replace(J.match[q], "");
                        if (!n) {
                            return []
                        }
                        break
                    }
                }
            }
            if (o === h) {
                if (n == null) {
                    P.error(o)
                } else {
                    break
                }
            }
            h = o
        }
        return r
    };
    P.error = function (a) {
        throw "Syntax error, unrecognized expression: " + a
    };
    var R = P.getText = function (f) {
        var c, b, a = f.nodeType,
        d = "";
        if (a) {
            if (a === 1) {
                if (typeof f.textContent === "string") {
                    return f.textContent
                } else {
                    if (typeof f.innerText === "string") {
                        return f.innerText.replace(z, "")
                    } else {
                        for (f = f.firstChild; f; f = f.nextSibling) {
                            d += R(f)
                        }
                    }
                }
            } else {
                if (a === 3 || a === 4) {
                    return f.nodeValue
                }
            }
        } else {
            for (c = 0; (b = f[c]); c++) {
                if (b.nodeType !== 8) {
                    d += R(b)
                }
            }
        }
        return d
    };
    var J = P.selectors = {
        order: ["ID", "NAME", "TAG"],
        match: {
            ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
            CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
            NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
            ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
            TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
            CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
            POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
            PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
        },
        leftMatch: {},
        attrMap: {
            "class": "className",
            "for": "htmlFor"
        },
        attrHandle: {
            href: function (a) {
                return a.getAttribute("href")
            },
            type: function (a) {
                return a.getAttribute("type")
            }
        },
        relative: {
            "+": function (d, j) {
                var b = typeof j === "string",
                g = b && !x.test(j),
                c = b && !g;
                if (g) {
                    j = j.toLowerCase()
                }
                for (var f = 0,
                a = d.length,
                h; f < a; f++) {
                    if ((h = d[f])) {
                        while ((h = h.previousSibling) && h.nodeType !== 1) { }
                        d[f] = c || h && h.nodeName.toLowerCase() === j ? h || false : h === j
                    }
                }
                if (c) {
                    P.filter(j, d, true)
                }
            },
            ">": function (c, h) {
                var f, g = typeof h === "string",
                d = 0,
                b = c.length;
                if (g && !x.test(h)) {
                    h = h.toLowerCase();
                    for (; d < b; d++) {
                        f = c[d];
                        if (f) {
                            var a = f.parentNode;
                            c[d] = a.nodeName.toLowerCase() === h ? a : false
                        }
                    }
                } else {
                    for (; d < b; d++) {
                        f = c[d];
                        if (f) {
                            c[d] = g ? f.parentNode : f.parentNode === h
                        }
                    }
                    if (g) {
                        P.filter(h, c, true)
                    }
                }
            },
            "": function (b, g, d) {
                var f, c = F++,
                a = A;
                if (typeof g === "string" && !x.test(g)) {
                    g = g.toLowerCase();
                    f = g;
                    a = S
                }
                a("parentNode", g, c, b, f, d)
            },
            "~": function (b, g, d) {
                var f, c = F++,
                a = A;
                if (typeof g === "string" && !x.test(g)) {
                    g = g.toLowerCase();
                    f = g;
                    a = S
                }
                a("previousSibling", g, c, b, f, d)
            }
        },
        find: {
            ID: function (d, c, b) {
                if (typeof c.getElementById !== "undefined" && !b) {
                    var a = c.getElementById(d[1]);
                    return a && a.parentNode ? [a] : []
                }
            },
            NAME: function (d, c) {
                if (typeof c.getElementsByName !== "undefined") {
                    var g = [],
                    f = c.getElementsByName(d[1]);
                    for (var b = 0,
                    a = f.length; b < a; b++) {
                        if (f[b].getAttribute("name") === d[1]) {
                            g.push(f[b])
                        }
                    }
                    return g.length === 0 ? null : g
                }
            },
            TAG: function (a, b) {
                if (typeof b.getElementsByTagName !== "undefined") {
                    return b.getElementsByTagName(a[1])
                }
            }
        },
        preFilter: {
            CLASS: function (b, j, g, a, d, c) {
                b = " " + b[1].replace(D, "") + " ";
                if (c) {
                    return b
                }
                for (var h = 0,
                f; (f = j[h]) != null; h++) {
                    if (f) {
                        if (d ^ (f.className && (" " + f.className + " ").replace(/[\t\n\r]/g, " ").indexOf(b) >= 0)) {
                            if (!g) {
                                a.push(f)
                            }
                        } else {
                            if (g) {
                                j[h] = false
                            }
                        }
                    }
                }
                return false
            },
            ID: function (a) {
                return a[1].replace(D, "")
            },
            TAG: function (b, a) {
                return b[1].replace(D, "").toLowerCase()
            },
            CHILD: function (a) {
                if (a[1] === "nth") {
                    if (!a[2]) {
                        P.error(a[0])
                    }
                    a[2] = a[2].replace(/^\+|\s*/g, "");
                    var b = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2] === "even" && "2n" || a[2] === "odd" && "2n+1" || !/\D/.test(a[2]) && "0n+" + a[2] || a[2]);
                    a[2] = (b[1] + (b[2] || 1)) - 0;
                    a[3] = b[3] - 0
                } else {
                    if (a[2]) {
                        P.error(a[0])
                    }
                }
                a[0] = F++;
                return a
            },
            ATTR: function (h, g, f, b, d, c) {
                var a = h[1] = h[1].replace(D, "");
                if (!c && J.attrMap[a]) {
                    h[1] = J.attrMap[a]
                }
                h[4] = (h[4] || h[5] || "").replace(D, "");
                if (h[2] === "~=") {
                    h[4] = " " + h[4] + " "
                }
                return h
            },
            PSEUDO: function (g, f, d, b, c) {
                if (g[1] === "not") {
                    if ((G.exec(g[3]) || "").length > 1 || /^\w/.test(g[3])) {
                        g[3] = P(g[3], null, null, f)
                    } else {
                        var a = P.filter(g[3], f, d, true ^ c);
                        if (!d) {
                            b.push.apply(b, a)
                        }
                        return false
                    }
                } else {
                    if (J.match.POS.test(g[0]) || J.match.CHILD.test(g[0])) {
                        return true
                    }
                }
                return g
            },
            POS: function (a) {
                a.unshift(true);
                return a
            }
        },
        filters: {
            enabled: function (a) {
                return a.disabled === false && a.type !== "hidden"
            },
            disabled: function (a) {
                return a.disabled === true
            },
            checked: function (a) {
                return a.checked === true
            },
            selected: function (a) {
                if (a.parentNode) {
                    a.parentNode.selectedIndex
                }
                return a.selected === true
            },
            parent: function (a) {
                return !!a.firstChild
            },
            empty: function (a) {
                return !a.firstChild
            },
            has: function (b, c, a) {
                return !!P(a[3], b).length
            },
            header: function (a) {
                return (/h\d/i).test(a.nodeName)
            },
            text: function (b) {
                var a = b.getAttribute("type"),
                c = b.type;
                return b.nodeName.toLowerCase() === "input" && "text" === c && (a === c || a === null)
            },
            radio: function (a) {
                return a.nodeName.toLowerCase() === "input" && "radio" === a.type
            },
            checkbox: function (a) {
                return a.nodeName.toLowerCase() === "input" && "checkbox" === a.type
            },
            file: function (a) {
                return a.nodeName.toLowerCase() === "input" && "file" === a.type
            },
            password: function (a) {
                return a.nodeName.toLowerCase() === "input" && "password" === a.type
            },
            submit: function (b) {
                var a = b.nodeName.toLowerCase();
                return (a === "input" || a === "button") && "submit" === b.type
            },
            image: function (a) {
                return a.nodeName.toLowerCase() === "input" && "image" === a.type
            },
            reset: function (b) {
                var a = b.nodeName.toLowerCase();
                return (a === "input" || a === "button") && "reset" === b.type
            },
            button: function (b) {
                var a = b.nodeName.toLowerCase();
                return a === "input" && "button" === b.type || a === "button"
            },
            input: function (a) {
                return (/input|select|textarea|button/i).test(a.nodeName)
            },
            focus: function (a) {
                return a === a.ownerDocument.activeElement
            }
        },
        setFilters: {
            first: function (b, a) {
                return a === 0
            },
            last: function (c, d, b, a) {
                return d === a.length - 1
            },
            even: function (b, a) {
                return a % 2 === 0
            },
            odd: function (b, a) {
                return a % 2 === 1
            },
            lt: function (b, c, a) {
                return c < a[3] - 0
            },
            gt: function (b, c, a) {
                return c > a[3] - 0
            },
            nth: function (b, c, a) {
                return a[3] - 0 === c
            },
            eq: function (b, c, a) {
                return a[3] - 0 === c
            }
        },
        filter: {
            PSEUDO: function (f, k, a, j) {
                var h = k[1],
                g = J.filters[h];
                if (g) {
                    return g(f, a, k, j)
                } else {
                    if (h === "contains") {
                        return (f.textContent || f.innerText || R([f]) || "").indexOf(k[3]) >= 0
                    } else {
                        if (h === "not") {
                            var d = k[3];
                            for (var b = 0,
                            c = d.length; b < c; b++) {
                                if (d[b] === f) {
                                    return false
                                }
                            }
                            return true
                        } else {
                            P.error(h)
                        }
                    }
                }
            },
            CHILD: function (f, c) {
                var d, j, a, k, h, b, l, m = c[1],
                g = f;
                switch (m) {
                    case "only":
                    case "first":
                        while ((g = g.previousSibling)) {
                            if (g.nodeType === 1) {
                                return false
                            }
                        }
                        if (m === "first") {
                            return true
                        }
                        g = f;
                    case "last":
                        while ((g = g.nextSibling)) {
                            if (g.nodeType === 1) {
                                return false
                            }
                        }
                        return true;
                    case "nth":
                        d = c[2];
                        j = c[3];
                        if (d === 1 && j === 0) {
                            return true
                        }
                        a = c[0];
                        k = f.parentNode;
                        if (k && (k[L] !== a || !f.nodeIndex)) {
                            b = 0;
                            for (g = k.firstChild; g; g = g.nextSibling) {
                                if (g.nodeType === 1) {
                                    g.nodeIndex = ++b
                                }
                            }
                            k[L] = a
                        }
                        l = f.nodeIndex - j;
                        if (d === 0) {
                            return l === 0
                        } else {
                            return (l % d === 0 && l / d >= 0)
                        }
                }
            },
            ID: function (b, a) {
                return b.nodeType === 1 && b.getAttribute("id") === a
            },
            TAG: function (b, a) {
                return (a === "*" && b.nodeType === 1) || !!b.nodeName && b.nodeName.toLowerCase() === a
            },
            CLASS: function (b, a) {
                return (" " + (b.className || b.getAttribute("class")) + " ").indexOf(a) > -1
            },
            ATTR: function (f, b) {
                var d = b[1],
                a = P.attr ? P.attr(f, d) : J.attrHandle[d] ? J.attrHandle[d](f) : f[d] != null ? f[d] : f.getAttribute(d),
                c = a + "",
                h = b[2],
                g = b[4];
                return a == null ? h === "!=" : !h && P.attr ? a != null : h === "=" ? c === g : h === "*=" ? c.indexOf(g) >= 0 : h === "~=" ? (" " + c + " ").indexOf(g) >= 0 : !g ? c && a !== false : h === "!=" ? c !== g : h === "^=" ? c.indexOf(g) === 0 : h === "$=" ? c.substr(c.length - g.length) === g : h === "|=" ? c === g || c.substr(0, g.length + 1) === g + "-" : false
            },
            POS: function (g, f, d, c) {
                var b = f[2],
                a = J.setFilters[b];
                if (a) {
                    return a(g, d, f, c)
                }
            }
        }
    };
    var K = J.match.POS,
    Q = function (b, a) {
        return "\\" + (a - 0 + 1)
    };
    for (var O in J.match) {
        J.match[O] = new RegExp(J.match[O].source + (/(?![^\[]*\])(?![^\(]*\))/.source));
        J.leftMatch[O] = new RegExp(/(^(?:.|\r|\n)*?)/.source + J.match[O].source.replace(/\\(\d+)/g, Q))
    }
    var I = function (b, a) {
        b = Array.prototype.slice.call(b, 0);
        if (a) {
            a.push.apply(a, b);
            return a
        }
        return b
    };
    try {
        Array.prototype.slice.call(document.documentElement.childNodes, 0)[0].nodeType
    } catch (y) {
        I = function (f, b) {
            var c = 0,
            d = b || [];
            if (C.call(f) === "[object Array]") {
                Array.prototype.push.apply(d, f)
            } else {
                if (typeof f.length === "number") {
                    for (var a = f.length; c < a; c++) {
                        d.push(f[c])
                    }
                } else {
                    for (; f[c]; c++) {
                        d.push(f[c])
                    }
                }
            }
            return d
        }
    }
    var E, H;
    if (document.documentElement.compareDocumentPosition) {
        E = function (b, a) {
            if (b === a) {
                M = true;
                return 0
            }
            if (!b.compareDocumentPosition || !a.compareDocumentPosition) {
                return b.compareDocumentPosition ? -1 : 1
            }
            return b.compareDocumentPosition(a) & 4 ? -1 : 1
        }
    } else {
        E = function (k, l) {
            if (k === l) {
                M = true;
                return 0
            } else {
                if (k.sourceIndex && l.sourceIndex) {
                    return k.sourceIndex - l.sourceIndex
                }
            }
            var b, g, f = [],
            h = [],
            c = k.parentNode,
            a = l.parentNode,
            j = c;
            if (c === a) {
                return H(k, l)
            } else {
                if (!c) {
                    return -1
                } else {
                    if (!a) {
                        return 1
                    }
                }
            }
            while (j) {
                f.unshift(j);
                j = j.parentNode
            }
            j = a;
            while (j) {
                h.unshift(j);
                j = j.parentNode
            }
            b = f.length;
            g = h.length;
            for (var d = 0; d < b && d < g; d++) {
                if (f[d] !== h[d]) {
                    return H(f[d], h[d])
                }
            }
            return d === b ? H(k, h[d], -1) : H(f[d], l, 1)
        };
        H = function (d, b, c) {
            if (d === b) {
                return c
            }
            var a = d.nextSibling;
            while (a) {
                if (a === b) {
                    return -1
                }
                a = a.nextSibling
            }
            return 1
        }
    } (function () {
        var c = document.createElement("div"),
        b = "script" + (new Date()).getTime(),
        a = document.documentElement;
        c.innerHTML = "<a name='" + b + "'/>";
        a.insertBefore(c, a.firstChild);
        if (document.getElementById(b)) {
            J.find.ID = function (h, g, f) {
                if (typeof g.getElementById !== "undefined" && !f) {
                    var d = g.getElementById(h[1]);
                    return d ? d.id === h[1] || typeof d.getAttributeNode !== "undefined" && d.getAttributeNode("id").nodeValue === h[1] ? [d] : undefined : []
                }
            };
            J.filter.ID = function (f, d) {
                var g = typeof f.getAttributeNode !== "undefined" && f.getAttributeNode("id");
                return f.nodeType === 1 && g && g.nodeValue === d
            }
        }
        a.removeChild(c);
        a = c = null
    })(); (function () {
        var a = document.createElement("div");
        a.appendChild(document.createComment(""));
        if (a.getElementsByTagName("*").length > 0) {
            J.find.TAG = function (g, d) {
                var f = d.getElementsByTagName(g[1]);
                if (g[1] === "*") {
                    var b = [];
                    for (var c = 0; f[c]; c++) {
                        if (f[c].nodeType === 1) {
                            b.push(f[c])
                        }
                    }
                    f = b
                }
                return f
            }
        }
        a.innerHTML = "<a href='#'></a>";
        if (a.firstChild && typeof a.firstChild.getAttribute !== "undefined" && a.firstChild.getAttribute("href") !== "#") {
            J.attrHandle.href = function (b) {
                return b.getAttribute("href", 2)
            }
        }
        a = null
    })();
    if (document.querySelectorAll) {
        (function () {
            var b = P,
            a = document.createElement("div"),
            c = "__sizzle__";
            a.innerHTML = "<p class='TEST'></p>";
            if (a.querySelectorAll && a.querySelectorAll(".TEST").length === 0) {
                return
            }
            P = function (l, g, q, m) {
                g = g || document;
                if (!m && !P.isXML(g)) {
                    var n = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(l);
                    if (n && (g.nodeType === 1 || g.nodeType === 9)) {
                        if (n[1]) {
                            return I(g.getElementsByTagName(l), q)
                        } else {
                            if (n[2] && J.find.CLASS && g.getElementsByClassName) {
                                return I(g.getElementsByClassName(n[2]), q)
                            }
                        }
                    }
                    if (g.nodeType === 9) {
                        if (l === "body" && g.body) {
                            return I([g.body], q)
                        } else {
                            if (n && n[3]) {
                                var r = g.getElementById(n[3]);
                                if (r && r.parentNode) {
                                    if (r.id === n[3]) {
                                        return I([r], q)
                                    }
                                } else {
                                    return I([], q)
                                }
                            }
                        }
                        try {
                            return I(g.querySelectorAll(l), q)
                        } catch (p) { }
                    } else {
                        if (g.nodeType === 1 && g.nodeName.toLowerCase() !== "object") {
                            var f = g,
                            t = g.getAttribute("id"),
                            h = t || c,
                            j = g.parentNode,
                            k = /^\s*[+~]/.test(l);
                            if (!t) {
                                g.setAttribute("id", h)
                            } else {
                                h = h.replace(/'/g, "\\$&")
                            }
                            if (k && j) {
                                g = g.parentNode
                            }
                            try {
                                if (!k || j) {
                                    return I(g.querySelectorAll("[id='" + h + "'] " + l), q)
                                }
                            } catch (o) { } finally {
                                if (!t) {
                                    f.removeAttribute("id")
                                }
                            }
                        }
                    }
                }
                return b(l, g, q, m)
            };
            for (var d in b) {
                P[d] = b[d]
            }
            a = null
        })()
    } (function () {
        var b = document.documentElement,
        c = b.matchesSelector || b.mozMatchesSelector || b.webkitMatchesSelector || b.msMatchesSelector;
        if (c) {
            var f = !c.call(document.createElement("div"), "div"),
            d = false;
            try {
                c.call(document.documentElement, "[test!='']:sizzle")
            } catch (a) {
                d = true
            }
            P.matchesSelector = function (j, g) {
                g = g.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
                if (!P.isXML(j)) {
                    try {
                        if (d || !J.match.PSEUDO.test(g) && !/!=/.test(g)) {
                            var k = c.call(j, g);
                            if (k || !f || j.document && j.document.nodeType !== 11) {
                                return k
                            }
                        }
                    } catch (h) { }
                }
                return P(g, null, null, [j]).length > 0
            }
        }
    })(); (function () {
        var a = document.createElement("div");
        a.innerHTML = "<div class='test e'></div><div class='test'></div>";
        if (!a.getElementsByClassName || a.getElementsByClassName("e").length === 0) {
            return
        }
        a.lastChild.className = "e";
        if (a.getElementsByClassName("e").length === 1) {
            return
        }
        J.order.splice(1, 0, "CLASS");
        J.find.CLASS = function (d, c, b) {
            if (typeof c.getElementsByClassName !== "undefined" && !b) {
                return c.getElementsByClassName(d[1])
            }
        };
        a = null
    })();
    function S(g, a, b, j, l, k) {
        for (var d = 0,
        f = j.length; d < f; d++) {
            var h = j[d];
            if (h) {
                var c = false;
                h = h[g];
                while (h) {
                    if (h[L] === b) {
                        c = j[h.sizset];
                        break
                    }
                    if (h.nodeType === 1 && !k) {
                        h[L] = b;
                        h.sizset = d
                    }
                    if (h.nodeName.toLowerCase() === a) {
                        c = h;
                        break
                    }
                    h = h[g]
                }
                j[d] = c
            }
        }
    }
    function A(g, a, b, j, l, k) {
        for (var d = 0,
        f = j.length; d < f; d++) {
            var h = j[d];
            if (h) {
                var c = false;
                h = h[g];
                while (h) {
                    if (h[L] === b) {
                        c = j[h.sizset];
                        break
                    }
                    if (h.nodeType === 1) {
                        if (!k) {
                            h[L] = b;
                            h.sizset = d
                        }
                        if (typeof a !== "string") {
                            if (h === a) {
                                c = true;
                                break
                            }
                        } else {
                            if (P.filter(a, [h]).length > 0) {
                                c = h;
                                break
                            }
                        }
                    }
                    h = h[g]
                }
                j[d] = c
            }
        }
    }
    if (document.documentElement.contains) {
        P.contains = function (b, a) {
            return b !== a && (b.contains ? b.contains(a) : true)
        }
    } else {
        if (document.documentElement.compareDocumentPosition) {
            P.contains = function (b, a) {
                return !!(b.compareDocumentPosition(a) & 16)
            }
        } else {
            P.contains = function () {
                return false
            }
        }
    }
    P.isXML = function (a) {
        var b = (a ? a.ownerDocument || a : 0).documentElement;
        return b ? b.nodeName !== "HTML" : false
    };
    var B = function (f, h, a) {
        var b, k = [],
        c = "",
        j = h.nodeType ? [h] : h;
        while ((b = J.match.PSEUDO.exec(f))) {
            c += b[0];
            f = f.replace(J.match.PSEUDO, "")
        }
        f = J.relative[f] ? f + "*" : f;
        for (var d = 0,
        g = j.length; d < g; d++) {
            P(f, j[d], k, a)
        }
        return P.filter(c, k)
    };
    baidu.dom.query = P
})(); (function () {
    var b = baidu.dom.ready = function () {
        var j = false,
        k = [],
        n;
        if (document.addEventListener) {
            n = function () {
                document.removeEventListener("DOMContentLoaded", n, false);
                m()
            }
        } else {
            if (document.attachEvent) {
                n = function () {
                    if (document.readyState === "complete") {
                        document.detachEvent("onreadystatechange", n);
                        m()
                    }
                }
            }
        }
        function m() {
            if (!m.isReady) {
                m.isReady = true;
                for (var c = 0,
                d = k.length; c < d; c++) {
                    k[c]()
                }
            }
        }
        function a() {
            try {
                document.documentElement.doScroll("left")
            } catch (c) {
                setTimeout(a, 1);
                return
            }
            m()
        }
        function l() {
            if (j) {
                return
            }
            j = true;
            if (document.readyState === "complete") {
                m.isReady = true
            } else {
                if (document.addEventListener) {
                    document.addEventListener("DOMContentLoaded", n, false);
                    window.addEventListener("load", m, false)
                } else {
                    if (document.attachEvent) {
                        document.attachEvent("onreadystatechange", n);
                        window.attachEvent("onload", m);
                        var d = false;
                        try {
                            d = window.frameElement == null
                        } catch (c) { }
                        if (document.documentElement.doScroll && d) {
                            a()
                        }
                    }
                }
            }
        }
        l();
        return function (c) {
            m.isReady ? c() : k.push(c)
        }
    } ();
    b.isReady = false
})();
baidu.dom.remove = function (d) {
    d = baidu.dom._g(d);
    var c = d.parentNode;
    c && c.removeChild(d)
};
baidu.dom.removeClass = function (o, n) {
    o = baidu.dom.g(o);
    var q = o.className.split(/\s+/),
    m = n.split(/\s+/),
    j,
    l = m.length,
    r,
    p = 0;
    for (; p < l; ++p) {
        for (r = 0, j = q.length; r < j; ++r) {
            if (q[r] == m[p]) {
                q.splice(r, 1);
                break
            }
        }
    }
    o.className = q.join(" ");
    return o
};
baidu.removeClass = baidu.dom.removeClass;
baidu.dom.removeStyle = function () {
    var d = document.createElement("DIV"),
    f,
    g = baidu.dom._g;
    if (d.style.removeProperty) {
        f = function (a, b) {
            a = g(a);
            a.style.removeProperty(b);
            return a
        }
    } else {
        if (d.style.removeAttribute) {
            f = function (a, b) {
                a = g(a);
                a.style.removeAttribute(baidu.string.toCamelCase(b));
                return a
            }
        }
    }
    d = null;
    return f
} ();
baidu.object.each = function (j, l) {
    var g, h, k;
    if ("function" == typeof l) {
        for (h in j) {
            if (j.hasOwnProperty(h)) {
                k = j[h];
                g = l.call(j, k, h);
                if (g === false) {
                    break
                }
            }
        }
    }
    return j
};
baidu.lang.isNumber = function (b) {
    return "[object Number]" == Object.prototype.toString.call(b) && isFinite(b)
};
baidu.event.getTarget = function (b) {
    return b.target || b.srcElement
};
baidu.dom.setBorderBoxSize = function (j, f) {
    var g = {};
    f.width && (g.width = parseFloat(f.width));
    f.height && (g.height = parseFloat(f.height));
    function h(a, b) {
        return parseFloat(baidu.getStyle(a, b)) || 0
    }
    if (baidu.browser.isStrict) {
        if (f.width) {
            g.width = parseFloat(f.width) - h(j, "paddingLeft") - h(j, "paddingRight") - h(j, "borderLeftWidth") - h(j, "borderRightWidth");
            g.width < 0 && (g.width = 0)
        }
        if (f.height) {
            g.height = parseFloat(f.height) - h(j, "paddingTop") - h(j, "paddingBottom") - h(j, "borderTopWidth") - h(j, "borderBottomWidth");
            g.height < 0 && (g.height = 0)
        }
    }
    return baidu.dom.setStyles(j, g)
};
baidu.dom.setOuterHeight = baidu.dom.setBorderBoxHeight = function (c, d) {
    return baidu.dom.setBorderBoxSize(c, {
        height: d
    })
};
baidu.dom.setOuterWidth = baidu.dom.setBorderBoxWidth = function (d, c) {
    return baidu.dom.setBorderBoxSize(d, {
        width: c
    })
};
baidu.dom.resizable = function (Y, V) {
    var L, O, S = {},
    Z, ab = {},
    I, C, F, aa, X, Q, M, H = false,
    R = false,
    E = {
        direction: ["e", "s", "se"],
        minWidth: 16,
        minHeight: 16,
        classPrefix: "tangram",
        directionHandlePosition: {}
    };
    if (!(L = baidu.dom.g(Y)) && baidu.getStyle(L, "position") == "static") {
        return false
    }
    aa = L.offsetParent;
    var N = baidu.getStyle(L, "position");
    O = baidu.extend(E, V);
    baidu.each(["minHeight", "minWidth", "maxHeight", "maxWidth"],
    function (a) {
        O[a] && (O[a] = parseFloat(O[a]))
    });
    I = [O.minWidth || 0, O.maxWidth || Number.MAX_VALUE, O.minHeight || 0, O.maxHeight || Number.MAX_VALUE];
    B();
    function B() {
        Q = baidu.extend({
            e: {
                right: "-5px",
                top: "0px",
                width: "7px",
                height: L.offsetHeight
            },
            s: {
                left: "0px",
                bottom: "-5px",
                height: "7px",
                width: L.offsetWidth
            },
            n: {
                left: "0px",
                top: "-5px",
                height: "7px",
                width: L.offsetWidth
            },
            w: {
                left: "-5px",
                top: "0px",
                height: L.offsetHeight,
                width: "7px"
            },
            se: {
                right: "1px",
                bottom: "1px",
                height: "16px",
                width: "16px"
            },
            sw: {
                left: "1px",
                bottom: "1px",
                height: "16px",
                width: "16px"
            },
            ne: {
                right: "1px",
                top: "1px",
                height: "16px",
                width: "16px"
            },
            nw: {
                left: "1px",
                top: "1px",
                height: "16px",
                width: "16px"
            }
        },
        O.directionHandlePosition);
        baidu.each(O.direction,
        function (d) {
            var c = O.classPrefix.split(" ");
            c[0] = c[0] + "-resizable-" + d;
            var a = baidu.dom.create("div", {
                className: c.join(" ")
            }),
            b = Q[d];
            b.cursor = d + "-resize";
            b.position = "absolute";
            baidu.setStyles(a, b);
            a.key = d;
            a.style.MozUserSelect = "none";
            L.appendChild(a);
            S[d] = a;
            baidu.on(a, "mousedown", U)
        });
        H = false
    }
    function W() {
        X && G();
        baidu.object.each(S,
        function (a) {
            baidu.un(a, "mousedown", U);
            baidu.dom.remove(a)
        });
        H = true
    }
    function P(a) {
        if (!H) {
            O = baidu.extend(O, a || {});
            W();
            B()
        }
    }
    function U(b) {
        R && G();
        var c = baidu.event.getTarget(b),
        d = c.key;
        X = c;
        R = true;
        if (c.setCapture) {
            c.setCapture()
        } else {
            if (window.captureEvents) {
                window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP)
            }
        }
        F = baidu.getStyle(document.body, "cursor");
        baidu.setStyle(document.body, "cursor", d + "-resize");
        baidu.on(document.body, "mouseup", G);
        baidu.on(document.body, "selectstart", K);
        C = document.body.style.MozUserSelect;
        document.body.style.MozUserSelect = "none";
        var a = baidu.page.getMousePosition();
        ab = J();
        M = setInterval(function () {
            D(d, a)
        },
        20);
        baidu.lang.isFunction(O.onresizestart) && O.onresizestart();
        baidu.event.preventDefault(b)
    }
    function G() {
        if (X && X.releaseCapture) {
            X.releaseCapture()
        } else {
            if (window.releaseEvents) {
                window.releaseEvents(Event.MOUSEMOVE | Event.MOUSEUP)
            }
        }
        baidu.un(document.body, "mouseup", G);
        baidu.un(document, "selectstart", K);
        document.body.style.MozUserSelect = C;
        baidu.un(document.body, "selectstart", K);
        clearInterval(M);
        baidu.setStyle(document.body, "cursor", F);
        X = null;
        R = false;
        baidu.lang.isFunction(O.onresizeend) && O.onresizeend()
    }
    function D(h, a) {
        var b = baidu.page.getMousePosition(),
        g = ab.width,
        j = ab.height,
        c = ab.top,
        d = ab.left,
        f;
        if (h.indexOf("e") >= 0) {
            g = Math.max(b.x - a.x + ab.width, I[0]);
            g = Math.min(g, I[1])
        } else {
            if (h.indexOf("w") >= 0) {
                g = Math.max(a.x - b.x + ab.width, I[0]);
                g = Math.min(g, I[1]);
                d -= g - ab.width
            }
        }
        if (h.indexOf("s") >= 0) {
            j = Math.max(b.y - a.y + ab.height, I[2]);
            j = Math.min(j, I[3])
        } else {
            if (h.indexOf("n") >= 0) {
                j = Math.max(a.y - b.y + ab.height, I[2]);
                j = Math.min(j, I[3]);
                c -= j - ab.height
            }
        }
        f = {
            width: g,
            height: j,
            top: c,
            left: d
        };
        baidu.dom.setOuterHeight(L, j);
        baidu.dom.setOuterWidth(L, g);
        baidu.setStyles(L, {
            top: c,
            left: d
        });
        S.n && baidu.setStyle(S.n, "width", g);
        S.s && baidu.setStyle(S.s, "width", g);
        S.e && baidu.setStyle(S.e, "height", j);
        S.w && baidu.setStyle(S.w, "height", j);
        baidu.lang.isFunction(O.onresize) && O.onresize({
            current: f,
            original: ab
        })
    }
    function K(a) {
        return baidu.event.preventDefault(a, false)
    }
    function J() {
        var d = baidu.dom.getPosition(L.offsetParent),
        c = baidu.dom.getPosition(L),
        a,
        b;
        if (N == "absolute") {
            a = c.top - (L.offsetParent == document.body ? 0 : d.top);
            b = c.left - (L.offsetParent == document.body ? 0 : d.left)
        } else {
            a = parseFloat(baidu.getStyle(L, "top")) || -parseFloat(baidu.getStyle(L, "bottom")) || 0;
            b = parseFloat(baidu.getStyle(L, "left")) || -parseFloat(baidu.getStyle(L, "right")) || 0
        }
        baidu.setStyles(L, {
            top: a,
            left: b
        });
        return {
            width: L.offsetWidth,
            height: L.offsetHeight,
            top: a,
            left: b
        }
    }
    return {
        cancel: W,
        update: P,
        enable: B
    }
};
baidu.dom.setPixel = function (d, f, g) {
    typeof g != "undefined" && (baidu.dom.g(d).style[f] = g + (!isNaN(g) ? "px" : ""))
};
baidu.dom.setPosition = function (c, d) {
    return baidu.dom.setStyles(c, {
        left: d.left - (parseFloat(baidu.dom.getStyle(c, "margin-left")) || 0),
        top: d.top - (parseFloat(baidu.dom.getStyle(c, "margin-top")) || 0)
    })
};
baidu.dom.show = function (b) {
    b = baidu.dom.g(b);
    b.style.display = "";
    return b
};
baidu.show = baidu.dom.show;
baidu.dom.toggle = function (b) {
    b = baidu.dom.g(b);
    b.style.display = b.style.display == "none" ? "" : "none";
    return b
};
baidu.dom.toggleClass = function (d, c) {
    if (baidu.dom.hasClass(d, c)) {
        baidu.dom.removeClass(d, c)
    } else {
        baidu.dom.addClass(d, c)
    }
};
baidu.dom._styleFilter[baidu.dom._styleFilter.length] = {
    get: function (l, k) {
        if (/color/i.test(l) && k.indexOf("rgb(") != -1) {
            var j = k.split(",");
            k = "#";
            for (var g = 0,
            h; h = j[g]; g++) {
                h = parseInt(h.replace(/[^\d]/gi, ""), 10).toString(16);
                k += h.length == 1 ? "0" + h : h
            }
            k = k.toUpperCase()
        }
        return k
    }
};
baidu.dom._styleFixer.display = baidu.browser.ie && baidu.browser.ie < 8 ? {
    set: function (d, c) {
        d = d.style;
        if (c == "inline-block") {
            d.display = "inline";
            d.zoom = 1
        } else {
            d.display = c
        }
    }
} : baidu.browser.firefox && baidu.browser.firefox < 3 ? {
    set: function (d, c) {
        d.style.display = c == "inline-block" ? "-moz-inline-box" : c
    }
} : null;
baidu.dom._styleFixer["float"] = baidu.browser.ie ? "styleFloat" : "cssFloat";
baidu.dom._styleFixer.opacity = baidu.browser.ie ? {
    get: function (d) {
        var c = d.style.filter;
        return c && c.indexOf("opacity=") >= 0 ? (parseFloat(c.match(/opacity=([^)]*)/)[1]) / 100) + "" : "1"
    },
    set: function (f, g) {
        var d = f.style;
        d.filter = (d.filter || "").replace(/alpha\([^\)]*\)/gi, "") + (g == 1 ? "" : "alpha(opacity=" + g * 100 + ")");
        d.zoom = 1
    }
} : null;
baidu.dom._styleFixer.textOverflow = (function () {
    var f = {};
    function g(b) {
        var a = b.length;
        if (a > 0) {
            a = b[a - 1];
            b.length--
        } else {
            a = null
        }
        return a
    }
    function j(b, a) {
        b[baidu.browser.firefox ? "textContent" : "innerText"] = a
    }
    function h(d, y, E) {
        var w = baidu.browser.ie ? d.currentStyle || d.style : getComputedStyle(d, null),
        F = w.fontWeight,
        a = "font-family:" + w.fontFamily + ";font-size:" + w.fontSize + ";word-spacing:" + w.wordSpacing + ";font-weight:" + ((parseInt(F) || 0) == 401 ? 700 : F) + ";font-style:" + w.fontStyle + ";font-variant:" + w.fontVariant,
        B = f[a];
        if (!B) {
            w = d.appendChild(document.createElement("div"));
            w.style.cssText = "float:left;" + a;
            B = f[a] = [];
            for (var c = 0; c < 256; c++) {
                c == 32 ? (w.innerHTML = "&nbsp;") : j(w, String.fromCharCode(c));
                B[c] = w.offsetWidth
            }
            j(w, "\u4e00");
            B[256] = w.offsetWidth;
            j(w, "\u4e00\u4e00");
            B[257] = w.offsetWidth - B[256] * 2;
            B[258] = B[".".charCodeAt(0)] * 3 + B[257] * 3;
            d.removeChild(w)
        }
        for (var o = d.firstChild,
        b = B[256], z = B[257], A = B[258], C = [], E = E ? A : 0; o; o = o.nextSibling) {
            if (y < E) {
                d.removeChild(o)
            } else {
                if (o.nodeType == 3) {
                    for (var c = 0,
                    D = o.nodeValue,
                    x = D.length; c < x; c++) {
                        w = D.charCodeAt(c);
                        C[C.length] = [y, o, c];
                        y -= (c ? z : 0) + (w < 256 ? B[w] : b);
                        if (y < E) {
                            break
                        }
                    }
                } else {
                    w = o.tagName;
                    if (w == "IMG" || w == "TABLE") {
                        w = o;
                        o = o.previousSibling;
                        d.removeChild(w)
                    } else {
                        C[C.length] = [y, o];
                        y -= o.offsetWidth
                    }
                }
            }
        }
        if (y < E) {
            while (w = g(C)) {
                y = w[0];
                o = w[1];
                w = w[2];
                if (o.nodeType == 3) {
                    if (y >= A) {
                        o.nodeValue = o.nodeValue.substring(0, w) + "...";
                        return true
                    } else {
                        if (!w) {
                            d.removeChild(o)
                        }
                    }
                } else {
                    if (h(o, y, true)) {
                        return true
                    } else {
                        d.removeChild(o)
                    }
                }
            }
            d.innerHTML = ""
        }
    }
    return {
        get: function (a) {
            var b = baidu.browser,
            c = dom.getStyle;
            return (b.opera ? c("OTextOverflow") : b.firefox ? a._baiduOverflow : c("textOverflow")) || "clip"
        },
        set: function (d, b) {
            var k = baidu.browser;
            if (d.tagName == "TD" || d.tagName == "TH" || k.firefox) {
                d._baiduHTML && (d.innerHTML = d._baiduHTML);
                if (b == "ellipsis") {
                    d._baiduHTML = d.innerHTML;
                    var a = document.createElement("div"),
                    c = d.appendChild(a).offsetWidth;
                    d.removeChild(a);
                    h(d, c)
                } else {
                    d._baiduHTML = ""
                }
            }
            a = d.style;
            k.opera ? (a.OTextOverflow = b) : k.firefox ? (d._baiduOverflow = b) : (a.textOverflow = b)
        }
    }
})();
baidu.lang.isArray = function (b) {
    return "[object Array]" == Object.prototype.toString.call(b)
};
baidu.lang.toArray = function (d) {
    if (d === null || d === undefined) {
        return []
    }
    if (baidu.lang.isArray(d)) {
        return d
    }
    if (typeof d.length !== "number" || typeof d === "string" || baidu.lang.isFunction(d)) {
        return [d]
    }
    if (d.item) {
        var f = d.length,
        g = new Array(f);
        while (f--) {
            g[f] = d[f]
        }
        return g
    }
    return [].slice.call(d)
};
baidu.fn.methodize = function (c, d) {
    return function () {
        return c.apply(this, [(d ? this[d] : this)].concat([].slice.call(arguments)))
    }
};
baidu.fn.wrapReturnValue = function (f, g, d) {
    d = d | 0;
    return function () {
        var a = f.apply(this, arguments);
        if (d > 0) {
            return new g(arguments[d - 1])
        }
        if (!d) {
            return new g(a)
        }
        return a
    }
};
baidu.fn.multize = function (h, f, g) {
    var j = function () {
        var a = arguments[0],
        d = f ? j : h,
        o = [],
        b = [].slice.call(arguments, 0),
        n = 0,
        p,
        c;
        if (a instanceof Array) {
            for (p = a.length; n < p; n++) {
                b[0] = a[n];
                c = d.apply(this, b);
                if (g) {
                    if (c) {
                        o = o.concat(c)
                    }
                } else {
                    o.push(c)
                }
            }
            return o
        } else {
            return h.apply(this, arguments)
        }
    };
    return j
};
baidu.element = function (c) {
    var d = baidu._g(c);
    if (!d && baidu.dom.query) {
        d = baidu.dom.query(c)
    }
    return new baidu.element.Element(d)
};
baidu.e = baidu.element;
baidu.element.Element = function (b) {
    if (!baidu.element._init) {
        baidu.element._makeChain();
        baidu.element._init = true
    }
    this._dom = (b.tagName || "").toLowerCase() == "select" ? [b] : baidu.lang.toArray(b)
};
baidu.element.Element.prototype.each = function (b) {
    baidu.array.each(this._dom,
    function (d, a) {
        b.call(d, d, a)
    })
};
baidu.element._toChainFunction = function (g, d, f) {
    return baidu.fn.methodize(baidu.fn.wrapReturnValue(baidu.fn.multize(g, 0, 1), baidu.element.Element, d), "_dom")
};
baidu.element._makeChain = function () {
    var d = baidu.element.Element.prototype,
    g = baidu.element._toChainFunction;
    baidu.each(("draggable droppable resizable fixable").split(" "),
    function (a) {
        d[a] = g(baidu.dom[a], 1)
    });
    baidu.each(("remove getText contains getAttr getPosition getStyle hasClass intersect hasAttr getComputedStyle").split(" "),
    function (a) {
        d[a] = d[a.replace(/^get[A-Z]/g, f)] = g(baidu.dom[a], -1)
    });
    baidu.each(("addClass empty hide show insertAfter insertBefore insertHTML removeClass setAttr setAttrs setStyle setStyles show toggleClass toggle next first getAncestorByClass getAncestorBy getAncestorByTag getDocument getParent getWindow last next prev g removeStyle setBorderBoxSize setOuterWidth setOuterHeight setBorderBoxWidth setBorderBoxHeight setPosition children query").split(" "),
    function (a) {
        d[a] = d[a.replace(/^get[A-Z]/g, f)] = g(baidu.dom[a], 0)
    });
    d.q = d.Q = g(function (a, b) {
        return baidu.dom.q.apply(this, [b, a].concat([].slice.call(arguments, 2)))
    },
    0);
    baidu.each(("on un").split(" "),
    function (a) {
        d[a] = g(baidu.event[a], 0)
    });
    baidu.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error").split(" "),
    function (a) {
        d[a] = function (b) {
            return this.on(a, b)
        }
    });
    function f(a) {
        return a.charAt(3).toLowerCase()
    }
};
baidu.element.extend = function (d) {
    var c = baidu.element;
    baidu.object.each(d,
    function (a, b) {
        c.Element.prototype[b] = baidu.element._toChainFunction(a, -1)
    })
};
baidu.event.EventArg = function (l, j) {
    j = j || window;
    l = l || j.event;
    var k = j.document;
    this.target = (l.target) || l.srcElement;
    this.keyCode = l.which || l.keyCode;
    for (var h in l) {
        var g = l[h];
        if ("function" != typeof g) {
            this[h] = g
        }
    }
    if (!this.pageX && this.pageX !== 0) {
        this.pageX = (l.clientX || 0) + (k.documentElement.scrollLeft || k.body.scrollLeft);
        this.pageY = (l.clientY || 0) + (k.documentElement.scrollTop || k.body.scrollTop)
    }
    this._event = l
};
baidu.event.EventArg.prototype.preventDefault = function () {
    if (this._event.preventDefault) {
        this._event.preventDefault()
    } else {
        this._event.returnValue = false
    }
    return this
};
baidu.event.EventArg.prototype.stopPropagation = function () {
    if (this._event.stopPropagation) {
        this._event.stopPropagation()
    } else {
        this._event.cancelBubble = true
    }
    return this
};
baidu.event.EventArg.prototype.stop = function () {
    return this.stopPropagation().preventDefault()
};
baidu.object.values = function (h) {
    var g = [],
    j = 0,
    f;
    for (f in h) {
        if (h.hasOwnProperty(f)) {
            g[j++] = h[f]
        }
    }
    return g
}; (function () {
    var w = baidu.browser,
    o = {
        keydown: 1,
        keyup: 1,
        keypress: 1
    },
    z = {
        click: 1,
        dblclick: 1,
        mousedown: 1,
        mousemove: 1,
        mouseup: 1,
        mouseover: 1,
        mouseout: 1
    },
    r = {
        abort: 1,
        blur: 1,
        change: 1,
        error: 1,
        focus: 1,
        load: w.ie ? 0 : 1,
        reset: 1,
        resize: 1,
        scroll: 1,
        select: 1,
        submit: 1,
        unload: w.ie ? 0 : 1
    },
    u = {
        scroll: 1,
        resize: 1,
        reset: 1,
        submit: 1,
        change: 1,
        select: 1,
        error: 1,
        abort: 1
    },
    p = {
        KeyEvents: ["bubbles", "cancelable", "view", "ctrlKey", "altKey", "shiftKey", "metaKey", "keyCode", "charCode"],
        MouseEvents: ["bubbles", "cancelable", "view", "detail", "screenX", "screenY", "clientX", "clientY", "ctrlKey", "altKey", "shiftKey", "metaKey", "button", "relatedTarget"],
        HTMLEvents: ["bubbles", "cancelable"],
        UIEvents: ["bubbles", "cancelable", "view", "detail"],
        Events: ["bubbles", "cancelable"]
    };
    baidu.object.extend(u, o);
    baidu.object.extend(u, z);
    function x(a, c) {
        var d = 0,
        f = a.length,
        b = {};
        for (; d < f; d++) {
            b[a[d]] = c[a[d]];
            delete c[a[d]]
        }
        return b
    }
    function v(c, d, f) {
        f = baidu.object.extend({},
        f);
        var b = baidu.object.values(x(p[d], f)),
        a = document.createEvent(d);
        b.unshift(c);
        if ("KeyEvents" == d) {
            a.initKeyEvent.apply(a, b)
        } else {
            if ("MouseEvents" == d) {
                a.initMouseEvent.apply(a, b)
            } else {
                if ("UIEvents" == d) {
                    a.initUIEvent.apply(a, b)
                } else {
                    a.initEvent.apply(a, b)
                }
            }
        }
        baidu.object.extend(a, f);
        return a
    }
    function y(b) {
        var a;
        if (document.createEventObject) {
            a = document.createEventObject();
            baidu.object.extend(a, b)
        }
        return a
    }
    function t(b, f) {
        f = x(p.KeyEvents, f);
        var a;
        if (document.createEvent) {
            try {
                a = v(b, "KeyEvents", f)
            } catch (c) {
                try {
                    a = v(b, "Events", f)
                } catch (d) {
                    a = v(b, "UIEvents", f)
                }
            }
        } else {
            f.keyCode = f.charCode > 0 ? f.charCode : f.keyCode;
            a = y(f)
        }
        return a
    }
    function n(b, c) {
        c = x(p.MouseEvents, c);
        var a;
        if (document.createEvent) {
            a = v(b, "MouseEvents", c);
            if (c.relatedTarget && !a.relatedTarget) {
                if ("mouseout" == b.toLowerCase()) {
                    a.toElement = c.relatedTarget
                } else {
                    if ("mouseover" == b.toLowerCase()) {
                        a.fromElement = c.relatedTarget
                    }
                }
            }
        } else {
            c.button = c.button == 0 ? 1 : c.button == 1 ? 4 : baidu.lang.isNumber(c.button) ? c.button : 0;
            a = y(c)
        }
        return a
    }
    function q(c, f) {
        f.bubbles = u.hasOwnProperty(c);
        f = x(p.HTMLEvents, f);
        var a;
        if (document.createEvent) {
            try {
                a = v(c, "HTMLEvents", f)
            } catch (b) {
                try {
                    a = v(c, "UIEvents", f)
                } catch (d) {
                    a = v(c, "Events", f)
                }
            }
        } else {
            a = y(f)
        }
        return a
    }
    baidu.event.fire = function (c, b, d) {
        var a;
        b = b.replace(/^on/i, "");
        c = baidu.dom._g(c);
        d = baidu.object.extend({
            bubbles: true,
            cancelable: true,
            view: window,
            detail: 1,
            screenX: 0,
            screenY: 0,
            clientX: 0,
            clientY: 0,
            ctrlKey: false,
            altKey: false,
            shiftKey: false,
            metaKey: false,
            keyCode: 0,
            charCode: 0,
            button: 0,
            relatedTarget: null
        },
        d);
        if (o[b]) {
            a = t(b, d)
        } else {
            if (z[b]) {
                a = n(b, d)
            } else {
                if (r[b]) {
                    a = q(b, d)
                } else {
                    throw (new Error(b + " is not support!"))
                }
            }
        }
        if (a) {
            if (c.dispatchEvent) {
                c.dispatchEvent(a)
            } else {
                if (c.fireEvent) {
                    c.fireEvent("on" + b, a)
                }
            }
        }
    }
})();
baidu.event.get = function (d, c) {
    return new baidu.event.EventArg(d, c)
};
baidu.event.getEvent = function (d) {
    if (window.event) {
        return window.event
    } else {
        var c = arguments.callee;
        do {
            if (/Event/.test(c.arguments[0])) {
                return c.arguments[0]
            }
        } while (c = c.caller);
        return null
    }
};
baidu.event.getKeyCode = function (b) {
    return b.which || b.keyCode
};
baidu.event.getPageX = function (d) {
    var f = d.pageX,
    g = document;
    if (!f && f !== 0) {
        f = (d.clientX || 0) + (g.documentElement.scrollLeft || g.body.scrollLeft)
    }
    return f
};
baidu.event.getPageY = function (d) {
    var f = d.pageY,
    g = document;
    if (!f && f !== 0) {
        f = (d.clientY || 0) + (g.documentElement.scrollTop || g.body.scrollTop)
    }
    return f
};
baidu.event.once = function (g, f, j) {
    g = baidu.dom._g(g);
    function h(a) {
        j.call(g, a);
        baidu.event.un(g, f, h)
    }
    baidu.event.on(g, f, h);
    return g
};
baidu.event.stopPropagation = function (b) {
    if (b.stopPropagation) {
        b.stopPropagation()
    } else {
        b.cancelBubble = true
    }
};
baidu.event.stop = function (d) {
    var c = baidu.event;
    c.stopPropagation(d);
    c.preventDefault(d)
};
baidu.event._eventFilter = baidu.event._eventFilter || {};
baidu.event._eventFilter._crossElementBoundary = function (g, h) {
    var j = h.relatedTarget,
    f = h.currentTarget;
    if (j === false || f == j || (j && (j.prefix == "xul" || baidu.dom.contains(f, j)))) {
        return
    }
    return g.call(f, h)
};
baidu.fn.bind = function (d, f) {
    var g = arguments.length > 2 ? [].slice.call(arguments, 2) : null;
    return function () {
        var a = baidu.lang.isString(d) ? f[d] : d,
        b = (g) ? g.concat([].slice.call(arguments, 0)) : arguments;
        return a.apply(f || a, b)
    }
};
baidu.event._eventFilter.mouseenter = window.attachEvent ? null : function (f, d, g) {
    return {
        type: "mouseover",
        listener: baidu.fn.bind(baidu.event._eventFilter._crossElementBoundary, this, g)
    }
};
baidu.event._eventFilter.mouseleave = window.attachEvent ? null : function (f, d, g) {
    return {
        type: "mouseout",
        listener: baidu.fn.bind(baidu.event._eventFilter._crossElementBoundary, this, g)
    }
};
baidu.event._unload = function () {
    var l = baidu.event._listeners,
    h = l.length,
    g = !!window.removeEventListener,
    j, k;
    while (h--) {
        j = l[h];
        if (j[1] == "unload") {
            continue
        }
        if (!(k = j[0])) {
            continue
        }
        if (k.removeEventListener) {
            k.removeEventListener(j[1], j[3], false)
        } else {
            if (k.detachEvent) {
                k.detachEvent("on" + j[1], j[3])
            }
        }
    }
    if (g) {
        window.removeEventListener("unload", baidu.event._unload, false)
    } else {
        window.detachEvent("onunload", baidu.event._unload)
    }
};
if (window.attachEvent) {
    window.attachEvent("onunload", baidu.event._unload)
} else {
    window.addEventListener("unload", baidu.event._unload, false)
}
baidu.fn.abstractMethod = function () {
    throw Error("unimplemented abstract method")
};
baidu.form = baidu.form || {};
baidu.form.json = function (E, C) {
    var F = E.elements,
    C = C ||
    function (b, a) {
        return b
    },
    z = {},
    t,
    x,
    r,
    D,
    G,
    u,
    v,
    w;
    function B(a, c) {
        var b = z[a];
        if (b) {
            b.push || (z[a] = [b]);
            z[a].push(c)
        } else {
            z[a] = c
        }
    }
    for (var A = 0,
    y = F.length; A < y; A++) {
        t = F[A];
        r = t.name;
        if (!t.disabled && r) {
            x = t.type;
            D = baidu.url.escapeSymbol(t.value);
            switch (x) {
                case "radio":
                case "checkbox":
                    if (!t.checked) {
                        break
                    }
                case "textarea":
                case "text":
                case "password":
                case "hidden":
                case "file":
                case "select-one":
                    B(r, C(D, r));
                    break;
                case "select-multiple":
                    G = t.options;
                    v = G.length;
                    for (u = 0; u < v; u++) {
                        w = G[u];
                        if (w.selected) {
                            B(r, C(w.value, r))
                        }
                    }
                    break
            }
        }
    }
    return z
};
baidu.form.serialize = function (E, C) {
    var F = E.elements,
    C = C ||
    function (b, a) {
        return b
    },
    z = [],
    t,
    x,
    r,
    D,
    G,
    u,
    v,
    w;
    function B(a, b) {
        z.push(a + "=" + b)
    }
    for (var A = 0,
    y = F.length; A < y; A++) {
        t = F[A];
        r = t.name;
        if (!t.disabled && r) {
            x = t.type;
            D = baidu.url.escapeSymbol(t.value);
            switch (x) {
                case "radio":
                case "checkbox":
                    if (!t.checked) {
                        break
                    }
                case "textarea":
                case "text":
                case "password":
                case "hidden":
                case "file":
                case "select-one":
                    B(r, C(D, r));
                    break;
                case "select-multiple":
                    G = t.options;
                    v = G.length;
                    for (u = 0; u < v; u++) {
                        w = G[u];
                        if (w.selected) {
                            B(r, C(w.value, r))
                        }
                    }
                    break
            }
        }
    }
    return z
};
baidu.global = baidu.global || {};
window[baidu.guid].global = window[baidu.guid].global || {}; (function () {
    var b = window[baidu.guid].global;
    baidu.global.get = function (a) {
        return b[a]
    }
})(); (function () {
    var b = window[baidu.guid].global;
    baidu.global.set = function (h, a, j) {
        var k = !j || (j && typeof b[h] == "undefined");
        k && (b[h] = a);
        return b[h]
    }
})();
baidu.global.getZIndex = function (f, g) {
    var d = baidu.global.get("zIndex");
    if (f) {
        d[f] = d[f] + (g || 1)
    }
    return d[f]
};
baidu.global.set("zIndex", {
    popup: 50000,
    dialog: 1000
},
true);
baidu.json = baidu.json || {};
baidu.json.parse = function (b) {
    return (new Function("return (" + b + ")"))()
};
baidu.json.decode = baidu.json.parse;
baidu.json.stringify = (function () {
    var g = {
        "\b": "\\b",
        "\t": "\\t",
        "\n": "\\n",
        "\f": "\\f",
        "\r": "\\r",
        '"': '\\"',
        "\\": "\\\\"
    };
    function h(a) {
        if (/["\\\x00-\x1f]/.test(a)) {
            a = a.replace(/["\\\x00-\x1f]/g,
            function (c) {
                var b = g[c];
                if (b) {
                    return b
                }
                b = c.charCodeAt();
                return "\\u00" + Math.floor(b / 16).toString(16) + (b % 16).toString(16)
            })
        }
        return '"' + a + '"'
    }
    function k(o) {
        var d = ["["],
        c = o.length,
        f,
        b,
        a;
        for (b = 0; b < c; b++) {
            a = o[b];
            switch (typeof a) {
                case "undefined":
                case "function":
                case "unknown":
                    break;
                default:
                    if (f) {
                        d.push(",")
                    }
                    d.push(baidu.json.stringify(a));
                    f = 1
            }
        }
        d.push("]");
        return d.join("")
    }
    function l(a) {
        return a < 10 ? "0" + a : a
    }
    function j(a) {
        return '"' + a.getFullYear() + "-" + l(a.getMonth() + 1) + "-" + l(a.getDate()) + "T" + l(a.getHours()) + ":" + l(a.getMinutes()) + ":" + l(a.getSeconds()) + '"'
    }
    return function (a) {
        switch (typeof a) {
            case "undefined":
                return "undefined";
            case "number":
                return isFinite(a) ? String(a) : "null";
            case "string":
                return h(a);
            case "boolean":
                return String(a);
            default:
                if (a === null) {
                    return "null"
                } else {
                    if (a instanceof Array) {
                        return k(a)
                    } else {
                        if (a instanceof Date) {
                            return j(a)
                        } else {
                            var f = ["{"],
                        b = baidu.json.stringify,
                        m,
                        c;
                            for (var d in a) {
                                if (Object.prototype.hasOwnProperty.call(a, d)) {
                                    c = a[d];
                                    switch (typeof c) {
                                        case "undefined":
                                        case "unknown":
                                        case "function":
                                            break;
                                        default:
                                            if (m) {
                                                f.push(",")
                                            }
                                            m = 1;
                                            f.push(b(d) + ":" + b(c))
                                    }
                                }
                            }
                            f.push("}");
                            return f.join("")
                        }
                    }
                }
        }
    }
})();
baidu.json.encode = baidu.json.stringify;
baidu.lang.Class.prototype.addEventListeners = function (l, k) {
    if (typeof k == "undefined") {
        for (var g in l) {
            this.addEventListener(g, l[g])
        }
    } else {
        l = l.split(",");
        var g = 0,
        h = l.length,
        j;
        for (; g < h; g++) {
            this.addEventListener(baidu.trim(l[g]), k)
        }
    }
};
baidu.lang.createClass = function (t, l) {
    l = l || {};
    var n = l.superClass || baidu.lang.Class;
    var m = function () {
        var c = this;
        l.decontrolled && (c.__decontrolled = true);
        n.apply(c, arguments);
        for (b in m.options) {
            c[b] = m.options[b]
        }
        t.apply(c, arguments);
        for (var b = 0,
        a = m["\x06r"]; a && b < a.length; b++) {
            a[b].apply(c, arguments)
        }
    };
    m.options = l.options || {};
    var u = function () { },
    o = t.prototype;
    u.prototype = n.prototype;
    var q = m.prototype = new u();
    for (var r in o) {
        q[r] = o[r]
    }
    var p = l.className || l.type;
    typeof p == "string" && (q.__type = p);
    q.constructor = o.constructor;
    m.extend = function (a) {
        for (var b in a) {
            m.prototype[b] = a[b]
        }
        return m
    };
    return m
};
window[baidu.guid]._instances = window[baidu.guid]._instances || {};
baidu.lang.decontrol = function (c) {
    var d = window[baidu.guid];
    d._instances && (delete d._instances[c])
};
baidu.lang.eventCenter = baidu.lang.eventCenter || baidu.lang.createSingle();
baidu.lang.getModule = function (g, l) {
    var k = g.split("."),
    j = l || window,
    h;
    for (; h = k.shift(); ) {
        if (j[h] != null) {
            j = j[h]
        } else {
            return null
        }
    }
    return j
};
baidu.lang.inherits = function (l, n, o) {
    var p, m, k = l.prototype,
    j = new Function();
    j.prototype = n.prototype;
    m = l.prototype = new j();
    for (p in k) {
        m[p] = k[p]
    }
    l.prototype.constructor = l;
    l.superClass = n.prototype;
    typeof o == "string" && (m.__type = o);
    l.extend = function (a) {
        for (var b in a) {
            m[b] = a[b]
        }
        return l
    };
    return l
};
baidu.inherits = baidu.lang.inherits;
baidu.lang.instance = function (b) {
    return window[baidu.guid]._instances[b] || null
};
baidu.lang.isBoolean = function (b) {
    return typeof b === "boolean"
};
baidu.lang.isDate = function (b) {
    return {}.toString.call(b) === "[object Date]" && b.toString() !== "Invalid Date" && !isNaN(b)
};
baidu.lang.isElement = function (b) {
    return !!(b && b.nodeName && b.nodeType == 1)
};
baidu.lang.isObject = function (b) {
    return "function" == typeof b || !!(b && "object" == typeof b)
};
baidu.isObject = baidu.lang.isObject;
baidu.lang.module = function (name, module, owner) {
    var packages = name.split("."),
    len = packages.length - 1,
    packageName,
    i = 0;
    if (!owner) {
        try {
            if (!(new RegExp("^[a-zA-Z_\x24][a-zA-Z0-9_\x24]*\x24")).test(packages[0])) {
                throw ""
            }
            owner = eval(packages[0]);
            i = 1
        } catch (e) {
            owner = window
        }
    }
    for (; i < len; i++) {
        packageName = packages[i];
        if (!owner[packageName]) {
            owner[packageName] = {}
        }
        owner = owner[packageName]
    }
    if (!owner[packages[len]]) {
        owner[packages[len]] = module
    }
};
baidu.lang.register = function (g, k, h) {
    var l = g["\x06r"] || (g["\x06r"] = []);
    l[l.length] = k;
    for (var j in h) {
        g.prototype[j] = h[j]
    }
};
baidu.number.comma = function (c, d) {
    if (!d || d < 1) {
        d = 3
    }
    c = String(c).split(".");
    c[0] = c[0].replace(new RegExp("(\\d)(?=(\\d{" + d + "})+$)", "ig"), "$1,");
    return c.join(".")
};
baidu.number.randomInt = function (c, d) {
    return Math.floor(Math.random() * (d - c + 1) + c)
};
baidu.object.isPlain = function (g) {
    var d = Object.prototype.hasOwnProperty,
    f;
    if (!g || Object.prototype.toString.call(g) !== "[object Object]" || !("isPrototypeOf" in g)) {
        return false
    }
    if (g.constructor && !d.call(g, "constructor") && !d.call(g.constructor.prototype, "isPrototypeOf")) {
        return false
    }
    for (f in g) { }
    return f === undefined || d.call(g, f)
};
baidu.object.clone = function (j) {
    var g = j,
    l, h;
    if (!j || j instanceof Number || j instanceof String || j instanceof Boolean) {
        return g
    } else {
        if (baidu.lang.isArray(j)) {
            g = [];
            var k = 0;
            for (l = 0, h = j.length; l < h; l++) {
                g[k++] = baidu.object.clone(j[l])
            }
        } else {
            if (baidu.object.isPlain(j)) {
                g = {};
                for (l in j) {
                    if (j.hasOwnProperty(l)) {
                        g[l] = baidu.object.clone(j[l])
                    }
                }
            }
        }
    }
    return g
};
baidu.object.isEmpty = function (c) {
    for (var d in c) {
        return false
    }
    return true
};
baidu.object.keys = function (h) {
    var g = [],
    j = 0,
    f;
    for (f in h) {
        if (h.hasOwnProperty(f)) {
            g[j++] = f
        }
    }
    return g
};
baidu.object.map = function (h, j) {
    var f = {};
    for (var g in h) {
        if (h.hasOwnProperty(g)) {
            f[g] = j(h[g], g)
        }
    }
    return f
}; (function () {
    var c = function (a) {
        return baidu.lang.isObject(a) && !baidu.lang.isFunction(a)
    };
    function d(a, b, j, k, l) {
        if (b.hasOwnProperty(j)) {
            if (l && c(a[j])) {
                baidu.object.merge(a[j], b[j], {
                    overwrite: k,
                    recursive: l
                })
            } else {
                if (k || !(j in a)) {
                    a[j] = b[j]
                }
            }
        }
    }
    baidu.object.merge = function (o, u, b) {
        var r = 0,
        a = b || {},
        p = a.overwrite,
        n = a.whiteList,
        t = a.recursive,
        q;
        if (n && n.length) {
            q = n.length;
            for (; r < q; ++r) {
                d(o, u, n[r], p, t)
            }
        } else {
            for (r in u) {
                d(o, u, r, p, t)
            }
        }
        return o
    }
})();
baidu.page.createStyleSheet = function (j) {
    var k = j || {},
    m = k.document || document,
    n;
    if (baidu.browser.ie) {
        if (!k.url) {
            k.url = ""
        }
        return m.createStyleSheet(k.url, k.index)
    } else {
        n = "<style type='text/css'></style>";
        k.url && (n = "<link type='text/css' rel='stylesheet' href='" + k.url + "'/>");
        baidu.dom.insertHTML(m.getElementsByTagName("HEAD")[0], "beforeEnd", n);
        if (k.url) {
            return null
        }
        var h = m.styleSheets[m.styleSheets.length - 1],
        l = h.rules || h.cssRules;
        return {
            self: h,
            rules: h.rules || h.cssRules,
            addRule: function (c, a, b) {
                if (h.addRule) {
                    return h.addRule(c, a, b)
                } else {
                    if (h.insertRule) {
                        isNaN(b) && (b = l.length);
                        return h.insertRule(c + "{" + a + "}", b)
                    }
                }
            },
            removeRule: function (a) {
                if (h.removeRule) {
                    h.removeRule(a)
                } else {
                    if (h.deleteRule) {
                        isNaN(a) && (a = 0);
                        h.deleteRule(a)
                    }
                }
            }
        }
    }
};
baidu.page.getHeight = function () {
    var h = document,
    g = h.body,
    j = h.documentElement,
    f = h.compatMode == "BackCompat" ? g : h.documentElement;
    return Math.max(j.scrollHeight, g.scrollHeight, f.clientHeight)
};
baidu.page.getWidth = function () {
    var h = document,
    g = h.body,
    j = h.documentElement,
    f = h.compatMode == "BackCompat" ? g : h.documentElement;
    return Math.max(j.scrollWidth, g.scrollWidth, f.clientWidth)
};
baidu.page.lazyLoadImage = function (b) {
    b = b || {};
    b.preloadHeight = b.preloadHeight || 0;
    baidu.dom.ready(function () {
        var q = document.getElementsByTagName("IMG"),
        p = q,
        o = q.length,
        r = 0,
        a = t(),
        m = "data-tangram-ori-src",
        n;
        if (b.className) {
            p = [];
            for (; r < o; ++r) {
                if (baidu.dom.hasClass(q[r], b.className)) {
                    p.push(q[r])
                }
            }
        }
        function t() {
            return baidu.page.getScrollTop() + baidu.page.getViewHeight() + b.preloadHeight
        }
        for (r = 0, o = p.length; r < o; ++r) {
            n = p[r];
            if (baidu.dom.getPosition(n).top > a) {
                n.setAttribute(m, n.src);
                b.placeHolder ? n.src = b.placeHolder : n.removeAttribute("src")
            }
        }
        var u = function () {
            var h = t(),
            f,
            d = true,
            g = 0,
            c = p.length;
            for (; g < c; ++g) {
                n = p[g];
                f = n.getAttribute(m);
                f && (d = false);
                if (baidu.dom.getPosition(n).top < h && f) {
                    n.src = f;
                    n.removeAttribute(m);
                    baidu.lang.isFunction(b.onlazyload) && b.onlazyload(n)
                }
            }
            d && baidu.un(window, "scroll", u)
        };
        baidu.on(window, "scroll", u)
    })
};
baidu.page.load = function (t, l, q) {
    l = l || {};
    var n = baidu.page.load,
    v = n._cache = n._cache || {},
    o = n._loadingCache = n._loadingCache || {},
    p = l.parallel;
    function r() {
        for (var a = 0,
        b = t.length; a < b; ++a) {
            if (!v[t[a].url]) {
                setTimeout(arguments.callee, 10);
                return
            }
        }
        l.onload()
    }
    function u(f, c) {
        var d, a, b;
        switch (f.type.toLowerCase()) {
            case "css":
                d = document.createElement("link");
                d.setAttribute("rel", "stylesheet");
                d.setAttribute("type", "text/css");
                break;
            case "js":
                d = document.createElement("script");
                d.setAttribute("type", "text/javascript");
                d.setAttribute("charset", f.charset || n.charset);
                break;
            case "html":
                d = document.createElement("iframe");
                d.frameBorder = "none";
                break;
            default:
                return
        }
        b = function () {
            if (!a && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
                a = true;
                baidu.un(d, "load", b);
                baidu.un(d, "readystatechange", b);
                c.call(window, d)
            }
        };
        baidu.on(d, "load", b);
        baidu.on(d, "readystatechange", b);
        if (f.type == "css") {
            (function () {
                if (a) {
                    return
                }
                try {
                    d.sheet.cssRule
                } catch (g) {
                    setTimeout(arguments.callee, 20);
                    return
                }
                a = true;
                c.call(window, d)
            })()
        }
        d.href = d.src = f.url;
        document.getElementsByTagName("head")[0].appendChild(d)
    }
    baidu.lang.isString(t) && (t = [{
        url: t
    }]);
    if (!(t && t.length)) {
        return
    }
    function m(f) {
        var a = f.url,
        d = !!p,
        b, c = function (g) {
            v[f.url] = g;
            delete o[f.url];
            if (baidu.lang.isFunction(f.onload)) {
                if (false === f.onload.call(window, g)) {
                    return
                }
            } !p && n(t.slice(1), l, true);
            if ((!q) && baidu.lang.isFunction(l.onload)) {
                r()
            }
        };
        f.type = f.type || a.replace(/^[^\?#]+\.(css|js|html)(\?|#| |$)[^\?#]*/i, "$1");
        f.requestType = f.requestType || (f.type == "html" ? "ajax" : "dom");
        if (b = v[f.url]) {
            c(b);
            return d
        }
        if (!l.refresh && o[f.url]) {
            setTimeout(function () {
                m(f)
            },
            10);
            return d
        }
        o[f.url] = true;
        if (f.requestType.toLowerCase() == "dom") {
            u(f, c)
        } else {
            baidu.ajax.get(f.url,
            function (g, h) {
                c(h)
            })
        }
        return d
    }
    baidu.each(t, m)
};
baidu.page.load.charset = "UTF8";
baidu.page.loadCssFile = function (c) {
    var d = document.createElement("link");
    d.setAttribute("rel", "stylesheet");
    d.setAttribute("type", "text/css");
    d.setAttribute("href", c);
    document.getElementsByTagName("head")[0].appendChild(d)
};
baidu.page.loadJsFile = function (c) {
    var d = document.createElement("script");
    d.setAttribute("type", "text/javascript");
    d.setAttribute("src", c);
    d.setAttribute("defer", "defer");
    document.getElementsByTagName("head")[0].appendChild(d)
};
baidu.platform = baidu.platform || {};
baidu.platform.isAndroid = /android/i.test(navigator.userAgent);
baidu.platform.isIpad = /ipad/i.test(navigator.userAgent);
baidu.platform.isIphone = /iphone/i.test(navigator.userAgent);
baidu.platform.isMacintosh = /macintosh/i.test(navigator.userAgent);
baidu.platform.isWindows = /windows/i.test(navigator.userAgent);
baidu.platform.isX11 = /x11/i.test(navigator.userAgent);
baidu.sio = baidu.sio || {};
baidu.sio._createScriptTag = function (d, f, g) {
    d.setAttribute("type", "text/javascript");
    g && d.setAttribute("charset", g);
    d.setAttribute("src", f);
    document.getElementsByTagName("head")[0].appendChild(d)
};
baidu.sio._removeScriptTag = function (c) {
    if (c.clearAttributes) {
        c.clearAttributes()
    } else {
        for (var d in c) {
            if (c.hasOwnProperty(d)) {
                delete c[d]
            }
        }
    }
    if (c && c.parentNode) {
        c.parentNode.removeChild(c)
    }
    c = null
};
baidu.sio.callByBrowser = function (v, o, m) {
    var r = document.createElement("SCRIPT"),
    q = 0,
    l = m || {},
    t = l.charset,
    n = o ||
    function () { },
    p = l.timeOut || 0,
    u;
    r.onload = r.onreadystatechange = function () {
        if (q) {
            return
        }
        var a = r.readyState;
        if ("undefined" == typeof a || a == "loaded" || a == "complete") {
            q = 1;
            try {
                n();
                clearTimeout(u)
            } finally {
                r.onload = r.onreadystatechange = null;
                baidu.sio._removeScriptTag(r)
            }
        }
    };
    if (p) {
        u = setTimeout(function () {
            r.onload = r.onreadystatechange = null;
            baidu.sio._removeScriptTag(r);
            l.onfailure && l.onfailure()
        },
        p)
    }
    baidu.sio._createScriptTag(r, v, t)
};
baidu.sio.callByServer = function (F, t, r) {
    var x = document.createElement("SCRIPT"),
    y = "bd__cbs__",
    v,
    B,
    q = r || {},
    C = q.charset,
    A = q.queryField || "callback",
    u = q.timeOut || 0,
    E,
    D = new RegExp("(\\?|&)" + A + "=([^&]*)"),
    z;
    if (baidu.lang.isFunction(t)) {
        v = y + Math.floor(Math.random() * 2147483648).toString(36);
        window[v] = w(0)
    } else {
        if (baidu.lang.isString(t)) {
            v = t
        } else {
            if (z = D.exec(F)) {
                v = z[2]
            }
        }
    }
    if (u) {
        E = setTimeout(w(1), u)
    }
    F = F.replace(D, "\x241" + A + "=" + v);
    if (F.search(D) < 0) {
        F += (F.indexOf("?") < 0 ? "?" : "&") + A + "=" + v
    }
    baidu.sio._createScriptTag(x, F, C);
    function w(a) {
        return function () {
            try {
                if (a) {
                    q.onfailure && q.onfailure()
                } else {
                    t.apply(window, arguments);
                    clearTimeout(E)
                }
                window[v] = null;
                delete window[v]
            } catch (b) { } finally {
                baidu.sio._removeScriptTag(x)
            }
        }
    }
};
baidu.sio.log = function (d) {
    var f = new Image(),
    g = "tangram_sio_log_" + Math.floor(Math.random() * 2147483648).toString(36);
    window[g] = f;
    f.onload = f.onerror = f.onabort = function () {
        f.onload = f.onerror = f.onabort = null;
        window[g] = null;
        f = null
    };
    f.src = d
};
baidu.string.decodeHTML = function (d) {
    var c = String(d).replace(/&quot;/g, '"').replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
    return c.replace(/&#([\d]+);/g,
    function (a, b) {
        return String.fromCharCode(parseInt(b, 10))
    })
};
baidu.decodeHTML = baidu.string.decodeHTML;
baidu.string.encodeHTML = function (b) {
    return String(b).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;")
};
baidu.encodeHTML = baidu.string.encodeHTML;
baidu.string.filterFormat = function (j, g) {
    var f = Array.prototype.slice.call(arguments, 1),
    h = Object.prototype.toString;
    if (f.length) {
        f = f.length == 1 ? (g !== null && (/\[object Array\]|\[object Object\]/.test(h.call(g))) ? g : f) : f;
        return j.replace(/#\{(.+?)\}/g,
        function (o, c) {
            var a, d, n, p, b;
            if (!f) {
                return ""
            }
            a = c.split("|");
            d = f[a[0]];
            if ("[object Function]" == h.call(d)) {
                d = d(a[0])
            }
            for (n = 1, p = a.length; n < p; ++n) {
                b = baidu.string.filterFormat[a[n]];
                if ("[object Function]" == h.call(b)) {
                    d = b(d)
                }
            }
            return (("undefined" == typeof d || d === null) ? "" : d)
        })
    }
    return j
};
baidu.string.filterFormat.escapeJs = function (j) {
    if (!j || "string" != typeof j) {
        return j
    }
    var k, h, g, l = [];
    for (k = 0, h = j.length; k < h; ++k) {
        g = j.charCodeAt(k);
        if (g > 255) {
            l.push(j.charAt(k))
        } else {
            l.push("\\x" + g.toString(16))
        }
    }
    return l.join("")
};
baidu.string.filterFormat.js = baidu.string.filterFormat.escapeJs;
baidu.string.filterFormat.escapeString = function (b) {
    if (!b || "string" != typeof b) {
        return b
    }
    return b.replace(/["'<>\\\/`]/g,
    function (a) {
        return "&#" + a.charCodeAt(0) + ";"
    })
};
baidu.string.filterFormat.e = baidu.string.filterFormat.escapeString;
baidu.string.filterFormat.toInt = function (b) {
    return parseInt(b, 10) || 0
};
baidu.string.filterFormat.i = baidu.string.filterFormat.toInt;
baidu.string.format = function (j, g) {
    j = String(j);
    var f = Array.prototype.slice.call(arguments, 1),
    h = Object.prototype.toString;
    if (f.length) {
        f = f.length == 1 ? (g !== null && (/\[object Array\]|\[object Object\]/.test(h.call(g))) ? g : f) : f;
        return j.replace(/#\{(.+?)\}/g,
        function (c, a) {
            var b = f[a];
            if ("[object Function]" == h.call(b)) {
                b = b(a)
            }
            return ("undefined" == typeof b ? "" : b)
        })
    }
    return j
};
baidu.format = baidu.string.format; (function () {
    var g = /^\#[\da-f]{6}$/i,
    d = /^rgb\((\d+), (\d+), (\d+)\)$/,
    f = {
        black: "#000000",
        silver: "#c0c0c0",
        gray: "#808080",
        white: "#ffffff",
        maroon: "#800000",
        red: "#ff0000",
        purple: "#800080",
        fuchsia: "#ff00ff",
        green: "#008000",
        lime: "#00ff00",
        olive: "#808000",
        yellow: "#ffff0",
        navy: "#000080",
        blue: "#0000ff",
        teal: "#008080",
        aqua: "#00ffff"
    };
    baidu.string.formatColor = function (m) {
        if (g.test(m)) {
            return m
        } else {
            if (d.test(m)) {
                for (var a, b = 1,
                m = "#"; b < 4; b++) {
                    a = parseInt(RegExp["\x24" + b]).toString(16);
                    m += ("00" + a).substr(a.length)
                }
                return m
            } else {
                if (/^\#[\da-f]{3}$/.test(m)) {
                    var c = m.charAt(1),
                    l = m.charAt(2),
                    n = m.charAt(3);
                    return "#" + c + c + l + l + n + n
                } else {
                    if (f[m]) {
                        return f[m]
                    }
                }
            }
        }
        return ""
    }
})();
baidu.string.getByteLength = function (b) {
    return String(b).replace(/[^\x00-\xff]/g, "ci").length
};
baidu.string.stripTags = function (b) {
    return String(b || "").replace(/<[^>]+>/g, "")
};
baidu.string.subByte = function (g, d, f) {
    g = String(g);
    f = f || "";
    if (d < 0 || baidu.string.getByteLength(g) <= d) {
        return g + f
    }
    g = g.substr(0, d).replace(/([^\x00-\xff])/g, "\x241 ").substr(0, d).replace(/[^\x00-\xff]$/, "").replace(/([^\x00-\xff]) /g, "\x241");
    return g + f
};
baidu.string.toHalfWidth = function (b) {
    return String(b).replace(/[\uFF01-\uFF5E]/g,
    function (a) {
        return String.fromCharCode(a.charCodeAt(0) - 65248)
    }).replace(/\u3000/g, " ")
};
baidu.string.wbr = function (b) {
    return String(b).replace(/(?:<[^>]+>)|(?:&#?[0-9a-z]{2,6};)|(.{1})/gi, "$&<wbr>").replace(/><wbr>/g, ">")
};
baidu.swf = baidu.swf || {};
baidu.swf.version = (function () {
    var k = navigator;
    if (k.plugins && k.mimeTypes.length) {
        var n = k.plugins["Shockwave Flash"];
        if (n && n.description) {
            return n.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s)+r/, ".") + ".0"
        }
    } else {
        if (window.ActiveXObject && !window.opera) {
            for (var c = 12; c >= 2; c--) {
                try {
                    var l = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + c);
                    if (l) {
                        var j = l.GetVariable("$version");
                        return j.replace(/WIN/g, "").replace(/,/g, ".")
                    }
                } catch (m) { }
            }
        }
    }
})();
baidu.swf.createHTML = function (I) {
    I = I || {};
    var z = baidu.swf.version,
    B = I.ver || "6.0.0",
    C, E, D, F, A, J, H = {},
    v = baidu.string.encodeHTML;
    for (F in I) {
        H[F] = I[F]
    }
    I = H;
    if (z) {
        z = z.split(".");
        B = B.split(".");
        for (D = 0; D < 3; D++) {
            C = parseInt(z[D], 10);
            E = parseInt(B[D], 10);
            if (E < C) {
                break
            } else {
                if (E > C) {
                    return ""
                }
            }
        }
    } else {
        return ""
    }
    var x = I.vars,
    y = ["classid", "codebase", "id", "width", "height", "align"];
    I.align = I.align || "middle";
    I.classid = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";
    I.codebase = "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0";
    I.movie = I.url || "";
    delete I.vars;
    delete I.url;
    if ("string" == typeof x) {
        I.flashvars = x
    } else {
        var u = [];
        for (F in x) {
            J = x[F];
            u.push(F + "=" + encodeURIComponent(J))
        }
        I.flashvars = u.join("&")
    }
    var w = ["<object "];
    for (D = 0, A = y.length; D < A; D++) {
        J = y[D];
        w.push(" ", J, '="', v(I[J]), '"')
    }
    w.push(">");
    var G = {
        wmode: 1,
        scale: 1,
        quality: 1,
        play: 1,
        loop: 1,
        menu: 1,
        salign: 1,
        bgcolor: 1,
        base: 1,
        allowscriptaccess: 1,
        allownetworking: 1,
        allowfullscreen: 1,
        seamlesstabbing: 1,
        devicefont: 1,
        swliveconnect: 1,
        flashvars: 1,
        movie: 1
    };
    for (F in I) {
        J = I[F];
        F = F.toLowerCase();
        if (G[F] && (J || J === false || J === 0)) {
            w.push('<param name="' + F + '" value="' + v(J) + '" />')
        }
    }
    I.src = I.movie;
    I.name = I.id;
    delete I.id;
    delete I.movie;
    delete I.classid;
    delete I.codebase;
    I.type = "application/x-shockwave-flash";
    I.pluginspage = "http://www.macromedia.com/go/getflashplayer";
    w.push("<embed");
    var k;
    for (F in I) {
        J = I[F];
        if (J || J === false || J === 0) {
            if ((new RegExp("^salign\x24", "i")).test(F)) {
                k = J;
                continue
            }
            w.push(" ", F, '="', v(J), '"')
        }
    }
    if (k) {
        w.push(' salign="', v(k), '"')
    }
    w.push("></embed></object>");
    return w.join("")
};
baidu.swf.create = function (f, g) {
    f = f || {};
    var d = baidu.swf.createHTML(f) || f.errorMessage || "";
    if (g && "string" == typeof g) {
        g = document.getElementById(g)
    }
    baidu.dom.insertHTML(g || document.body, "beforeEnd", d)
};
baidu.swf.getMovie = function (g) {
    var f = document[g],
    d;
    return baidu.browser.ie == 9 ? f && f.length ? (d = baidu.array.remove(baidu.lang.toArray(f),
    function (a) {
        return a.tagName.toLowerCase() != "embed"
    })).length == 1 ? d[0] : d : f : f || window[g]
};
baidu.swf.Proxy = function (k, n, m) {
    var h = this,
    j = this._flash = baidu.swf.getMovie(k),
    l;
    if (!n) {
        return this
    }
    l = setInterval(function () {
        try {
            if (j[n]) {
                h._initialized = true;
                clearInterval(l);
                if (m) {
                    m()
                }
            }
        } catch (a) { }
    },
    100)
};
baidu.swf.Proxy.prototype.getFlash = function () {
    return this._flash
};
baidu.swf.Proxy.prototype.isReady = function () {
    return !!this._initialized
};
baidu.swf.Proxy.prototype.call = function (h, j) {
    try {
        var l = this.getFlash(),
        g = Array.prototype.slice.call(arguments);
        g.shift();
        if (l[h]) {
            l[h].apply(l, g)
        }
    } catch (k) { }
};
baidu.url.getQueryValue = function (f, j) {
    var h = new RegExp("(^|&|\\?|#)" + baidu.string.escapeReg(j) + "=([^&#]*)(&|\x24|#)", "");
    var g = f.match(h);
    if (g) {
        return g[2]
    }
    return null
};
baidu.url.jsonToQuery = function (l, j) {
    var h = [],
    k,
    g = j ||
    function (a) {
        return baidu.url.escapeSymbol(a)
    };
    baidu.object.each(l,
    function (a, b) {
        if (baidu.lang.isArray(a)) {
            k = a.length;
            while (k--) {
                h.push(b + "=" + g(a[k], b))
            }
        } else {
            h.push(b + "=" + g(a, b))
        }
    });
    return h.join("&")
};
baidu.url.queryToJson = function (w) {
    var q = w.substr(w.lastIndexOf("?") + 1),
    u = q.split("&"),
    r = u.length,
    m = {},
    t = 0,
    o,
    p,
    n,
    v;
    for (; t < r; t++) {
        if (!u[t]) {
            continue
        }
        v = u[t].split("=");
        o = v[0];
        p = v[1];
        n = m[o];
        if ("undefined" == typeof n) {
            m[o] = p
        } else {
            if (baidu.lang.isArray(n)) {
                n.push(p)
            } else {
                m[o] = [n, p]
            }
        }
    }
    return m
};
if (typeof window.qing == "undefined") {
    window.qing = {}
}
baidu.extend(qing, baidu);
qing.url = {};
baidu.extend(qing.url, baidu.url);
qing.url.jsonToQuery = function (a, b) {
    if (!b || typeof b !== "function") {
        b = function (c) {
            return (c + "").replace(/[#%&+=\/\\\ \f\r\n\t]/g,
            function (d) {
                return "%" + (256 + d.charCodeAt()).toString(16).substring(1).toUpperCase()
            })
        }
    }
    return baidu.url.jsonToQuery(a, b)
};
qing.ajax = {};
baidu.extend(qing.ajax, baidu.ajax);
qing.ajax.requestFromList = [{
    reg: /^http:\/\/hi\.baidu\.com\/home.*$/,
    value: "home_request"
},
{
    reg: /^http:\/\/hi\.baidu\.com\/new.*$/,
    value: "new_request"
}];
qing.ajax.qingSource = "";
qing.ajax.request = (function () {
    var h = qing.ajax.qingSource;
    var c = [];
    if (!h) {
        var b = location.href;
        var g = qing.ajax.requestFromList;
        for (var d = 0,
        a = g.length; d < a; d++) {
            var f = g[d].reg;
            if (f.test(b)) {
                qing.ajax.qingSource = g[d].value;
                h = g[d].value;
                break
            }
        }
    }
    return function (l, k) {
        var n;
        if (k.method && k.method != "get" && k.method != "GET") {
            n = "post";
            if (k.data && typeof k.data == "object") {
                k.data.bdstoken = k.data.bdstoken || qBdsToken
            } else {
                if (k.data && typeof k.data == "string") {
                    k.data = qing.url.queryToJson(k.data);
                    k.data.bdstoken = k.data.bdstoken || qBdsToken
                }
            }
            if (!k.data) {
                k.data = {
                    bdstoken: qBdsToken
                }
            }
            k.data = qing.url.jsonToQuery(k.data);
            if (k.data && k.data != "") {
                k.data += "&"
            }
            k.data += "qing_request_source=" + h;
            k.timeout = k.timeout || 10000;
            k.ontimeout = k.ontimeout ||
            function () {
                qui.showError("网络超时")
            }
        } else {
            n = "get";
            if (k.data && typeof k.data == "object") {
                k.data = qing.url.jsonToQuery(k.data)
            }
            l += (l.indexOf("?") == -1 ? "?" : "&") + "qing_request_source=" + h
        }
        for (var m = 0,
        j = c.length; m < j; m++) {
            var o = c[m];
            if (l == o.url) {
                if (n == "get" && o.method == "get") {
                    return
                } else {
                    if (n == "post" && o.method == "post" && ((k.data && k.data == o.data) || (!k.data))) {
                        return
                    }
                }
            }
        }
        c.push({
            url: l,
            data: k.data,
            method: n
        });
        var p = k.onsuccess ||
        function (q) { };
        k.onsuccess = function (z, r) {
            try {
                for (var v = 0,
                w = c.length; v < w; v++) {
                    var t = c[v];
                    if (l == t.url) {
                        if (n == "get" && t.method == "get") {
                            c.splice(v, 1);
                            break
                        } else {
                            if (n == "post" && t.method == "post" && ((k.data && k.data == t.data) || (!k.data))) {
                                c.splice(v, 1);
                                break
                            }
                        }
                    }
                }
                var u;
                u = qing.json.parse(r);
                var y = parseInt(u.errorNo);
                if (y == 0) {
                    return p(u.data)
                } else {
                    var q = false;
                    if (k.onerror) {
                        k.onerror(u);
                        q = true
                    }
                    if (k["onerrorno" + y]) {
                        k["onerrorno" + y]();
                        q = true
                    } else {
                        if (y == 102) {
                            qui.showForbidSelf();
                            q = true
                        }
                    } (!q) && (k.method == "post" || k.method == "POST") && qui.showError(u.errorMsg)
                }
            } catch (x) {
                k.onexception && k.onexception("format-error", r)
            }
        };
        return baidu.ajax.request(l, k)
    }
})();
qing.ajax.get = function (a, f, h, k, g) {
    if (!/[\?\&]asyn\=/.test(a)) {
        a = a + (a.indexOf("?") == -1 ? "?" : "&") + "asyn=1"
    }
    if (typeof f == "object") {
        f = qing.url.jsonToQuery(f);
        a += "&" + f
    }
    var b = h;
    var c = k;
    var d;
    if (typeof f == "function") {
        b = f;
        c = h;
        d = k
    }
    d = (undefined == d) ? true : d;
    if (d) {
        a += "&_" + +new Date() + "=1"
    }
    var j = {
        onsuccess: b,
        onerror: c
    };
    return qing.ajax.request(a, j)
};
qing.ajax.post = function (b, c, a, d) {
    return qing.ajax.request(b, {
        onsuccess: a,
        onerror: d,
        method: "POST",
        data: c
    })
};
qing.sio = {};
qing.extend(qing.sio, baidu.sio);
qing.sio.callByServer = function (a, c, b) {
    a += (a.indexOf("?") < 0 ? "?" : "&") + "qing_request_source=" + qing.ajax.qingSource;
    if (!/[\?\&]asyn\=/.test(a)) {
        a += (a.indexOf("?") < 0 ? "?" : "&") + "asyn=1"
    }
    if (typeof c == "string") {
        a += (a.indexOf("?") < 0 ? "?_" : "&_") + +new Date() + "=1"
    }
    baidu.sio.callByServer(a, c, b)
};
qing.sio.callByBrowser = function (a, c, b) {
    a += (a.indexOf("?") < 0 ? "?" : "&") + "qing_request_source=" + qing.ajax.qingSource;
    if (!/[\?\&]asyn\=/.test(a)) {
        a += (a.indexOf("?") < 0 ? "?" : "&") + "asyn=1"
    }
    if (typeof c == "string") {
        a += (a.indexOf("?") < 0 ? "?_" : "&_") + +new Date() + "=1"
    }
    baidu.sio.callByBrowser(a, c, b)
};
qing.sio.log = function (a) {
    a += (a.indexOf("?") < 0 ? "?_" : "&_") + +new Date() + "=1";
    return baidu.sio.log(a)
};
qing.sio.jsLoader = function (a) {
    var c = function () {
        this.load = function () {
            var h = document.getElementsByTagName("script");
            for (i = 0; i < h.length; i++) {
                if (h[i].src && h[i].src.indexOf(a.url) != -1) {
                    this.onsuccess();
                    return
                }
            }
            s = document.createElement("script");
            s.type = "text/javascript";
            s.charset = a.charset || "utf-8";
            if (a.url.indexOf("?")) {
                a.url += "?t=" + (new Date()).getTime()
            } else {
                a.url += "&" + (new Date()).getTime()
            }
            if (a.hasCallback) {
                var d = "_q_cbk_" + Math.floor(Math.random() * 10000) + "_" + (new Date()).getTime();
                window[d] = a.success;
                a.url += ("&callback=" + d)
            }
            s.src = a.url;
            var g = document.getElementsByTagName("head")[0];
            g.appendChild(s);
            var f = this;
            if (!a.hasCallback) {
                s.onload = s.onreadystatechange = function (j) {
                    if (this.readyState && this.readyState == "loading") {
                        return
                    }
                    f.onsuccess(j)
                }
            }
            s.onerror = function (j) {
                g.removeChild(s);
                f.onfailure(j)
            }
        };
        this.onsuccess = function (d) {
            a.success && a.success(d)
        };
        this.onfailure = function (d) {
            a.failure && a.failure(d)
        }
    };
    var b = new c();
    b.load()
};
qing.registNS = function (fullNS, isIgnorSelf) {
    var reg = /^[_$a-z]+[_$a-z0-9]*/i;
    var nsArray = fullNS.split(".");
    var sEval = "";
    var sNS = "";
    var n = isIgnorSelf ? nsArray.length - 1 : nsArray.length;
    for (var i = 0; i < n; i++) {
        if (!reg.test(nsArray[i])) {
            throw new Error("Invalid namespace:" + nsArray[i] + "");
            return
        }
        if (i != 0) {
            sNS += "."
        }
        sNS += nsArray[i];
        sEval += "if (typeof(" + sNS + ") == 'undefined') " + sNS + " = new Object();else " + sNS + ";"
    }
    if (sEval != "") {
        return eval(sEval)
    }
    return {}
};
qing.getUniqueId = function () {
    var a = 0;
    return function (b, c) {
        c = c || "XQing";
        b = qing.g(b);
        var d = c + (++a);
        return b ? (b.id ? b.id : (b.id = d)) : d
    }
} ();
qing.registNS("qext.fn");
qext.fn.getAncestorByClass = function (c, b) {
    var a = c;
    if (!a) {
        return a
    }
    while (a) {
        if (a.className && T.dom.hasClass(a, b)) {
            break
        }
        a = a.parentNode
    }
    return a
};
qext.fn.addEventMap = function (c, d, b, a) {
    T.array.each(d,
    function (f) {
        T.on(c, f,
        function (h) {
            var g = h.target || h.srcElement;
            if (!g) {
                return false
            }
            for (var k in b[f]) {
                var j = b[f][k];
                if ((g.className && qing.dom.hasClass(g, k))) {
                    if (f == "click" && h.button && h.button != 1) {
                        break
                    }
                    j.call(g, h);
                    break
                } else {
                    if (ancestor = qext.fn.getAncestorByClass(g, k)) {
                        if (f == "click" && h.button && h.button != 1) {
                            break
                        }
                        j.call(ancestor, h);
                        break
                    }
                }
            }
            if (typeof a === "function") {
                a.call(h)
            }
        })
    })
};
qext.fn.resizeImgSize = function (k, d) {
    if (T.browser.ie != 6) {
        return false
    }
    var j = k.offsetWidth;
    var c = k.offsetHeight;
    if ((d.maxwidth && j > d.maxwidth) || (d.maxheight && c > d.maxheight)) {
        var b = d.maxwidth || 10000000;
        var n = d.maxheight || 10000000;
        var a = j / b;
        var l = c / n;
        var m = Math.max(a, l);
        k.style.width = j / m + "px";
        k.style.height = c / m + "px"
    }
    if ((d.minwidth && j < d.minwidth) || (d.minheight && c < d.minheight)) {
        var g = d.minwidth || 10000000;
        var o = d.minheight || 10000000;
        var f = j / g;
        var p = c / o;
        var h = Math.max(f, p);
        k.style.width = j / h + "px";
        k.style.height = c / h + "px"
    }
    if (d.callback && typeof d.callback == "function") {
        d.callback()
    }
    k.style.position = "static"
};
qext.fn.imgCenterCrop = function (c, d, b) {
    var a = new Image();
    a.onload = function () {
        if (c.src.length < 1) {
            c.width = d;
            c.height = b;
            return
        }
        var f = this.width;
        var g = this.height;
        if (f < d && g < b) {
            c.width = d;
            c.height = b;
            return
        }
        if (f > g) {
            c.height = b;
            c.width = b * f / g
        } else {
            c.width = d;
            c.height = d * g / f
        }
        if (c.src) {
            c.style.display = ""
        }
        c.style.position = "relative";
        c.style.marginTop = (-(c.height - b) / 2) + "px";
        c.style.marginLeft = (-(c.width - d) / 2) + "px"
    };
    a.src = c.src
};
qext.fn.getDimensions = function (g) {
    element = T.g(g);
    var f = T.dom.getStyle(element, "display");
    if (f && f !== "none") {
        return {
            width: element.offsetWidth,
            height: element.offsetHeight
        }
    }
    var b = element.style;
    var a = {
        visibility: b.visibility,
        position: b.position,
        display: b.display
    };
    var d = {
        visibility: "hidden",
        display: "block"
    };
    if (a.position !== "fixed") {
        d.position = "absolute"
    }
    T.dom.setStyle(element, d);
    var c = {
        width: element.offsetWidth,
        height: element.offsetHeight
    };
    T.dom.setStyle(element, a);
    return c
};
qext.fn.scrollFix = function (c, g) {
    g = parseInt(g, 10) || 40;
    var b = qing.dom.getPosition(c).top - g;
    var f = T.browser.isWebkit ? document.body : document.documentElement;
    var d = f.scrollTop;
    var a = b < 0 ? 0 : b;
    qani.animate(f, {
        scroll: a
    })
};
qext.stylesheet = function (b, a) {
    var a = a || document;
    if (a || qing.browser.ie == 6) {
        return new qext.SelfStylesheet(b, a)
    }
    if (!qext.stylesheet.singleton) {
        qext.stylesheet.singleton = new qext.SelfStylesheet(b, a);
        return qext.stylesheet.singleton
    }
    qext.stylesheet.singleton.addRule(b);
    return qext.stylesheet.singleton
};
qext.SelfStylesheet = function (c, b) {
    this.rules = {};
    var a = b.getElementsByTagName("head")[0];
    if (b) {
        this.eStyle = b.createElement("style");
        this.eStyle.type = "text/css"
    } else {
        this.eStyle = qing.dom.create("style", {
            type: "text/css"
        })
    }
    this.addRule(c);
    a.appendChild(this.eStyle)
};
qext.SelfStylesheet.prototype = {
    addRule: function (k, h) {
        var j;
        var g = this.eStyle;
        if (!h) {
            j = k
        } else {
            j = {
                key: h
            }
        }
        var d = (function () {
            if (g.styleSheet) {
                return function (l, m) {
                    if (qing.browser.ie < 8) {
                        l.styleSheet.cssText = m
                    } else {
                        l.styleSheet.cssText += m
                    }
                }
            }
            return function (l, n) {
                var m = document.createTextNode(n);
                l.appendChild(m)
            }
        })();
        var b = "";
        for (var f in j) {
            b += f + "{";
            var a = j[f];
            for (var c in a) {
                b += c + ":" + a[c] + ";"
            }
            b += "}"
        }
        d(g, b)
    }
};
qing.registNS("qext");
qext.FontDetect = (function () {
    var a = null;
    var f = null;
    var c = false;
    var d = function (n) {
        var o = document.createElement("p");
        qing.dom.setStyles(o, {
            "font-family": n + ", Times New Roman",
            "font-size": "300pt",
            display: "inline",
            position: "absolute",
            top: "-10000px",
            left: "-10000px"
        });
        qing.dom.addClass(o, "sp-font-detect");
        o.innerHTML = "mmmmmmmmml";
        document.body.appendChild(o);
        var m = o.offsetWidth;
        document.body.removeChild(o);
        return m
    };
    var j = function () {
        if (!a) {
            a = d("Times New Roman")
        }
        return a
    };
    var l = function () {
        if (qing.browser.ie) {
            f = qing.dom.create("object", {
                id: "sp-font-detect-obj",
                classid: "clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b"
            });
            qing.dom.setStyles(f, {
                position: "absolute",
                top: "-10000px",
                left: "-10000px",
                width: "1px",
                height: "1px"
            });
            document.body.appendChild(f);
            c = true
        }
    };
    var g = function (p, m) {
        for (var o = 0,
        n = m.length; o < n; o++) {
            if (p == m[o]) {
                return true
            }
        }
        return false
    };
    var k = function () {
        if (typeof screen.fontSmoothingEnabled != "undefined") {
            return screen.fontSmoothingEnabled
        } else {
            try {
                var t = document.createElement("canvas");
                t.width = "35";
                t.height = "35";
                t.style.display = "none";
                document.body.appendChild(t);
                var v = t.getContext("2d");
                v.textBaseline = "top";
                v.font = "32px Arial";
                v.fillStyle = "black";
                v.strokeStyle = "black";
                v.fillText("E", 0, 0);
                for (var n = 8; n <= 32; n++) {
                    for (var m = 1; m <= 32; m++) {
                        var p = v.getImageData(m, n, 1, 1).data[3];
                        if (p != 255 && p != 0) {
                            document.body.removeChild(t);
                            return true
                        }
                    }
                }
                document.body.removeChild(t);
                return false
            } catch (w) {
                return null
            }
        }
    };
    var h = function (r, u) {
        if (typeof u !== "function") {
            u = new Function()
        }
        var q = false;
        if (g("Times New Roman", r)) {
            return u(true)
        }
        if (qing.browser.ie) {
            if (!c) {
                l()
            }
            var t = f.fonts;
            if (t.count) {
                for (var o = 1,
                p = t.count; o <= p; o++) {
                    if (g(t(o), r)) {
                        return u(true)
                    }
                }
            }
            return u(false)
        } else {
            var m = 0;
            var w = j();
            for (var n = 0,
            v = r.length; n < v; n++) {
                m = d(r[n]);
                if (m !== w) {
                    return u(true)
                }
            }
            return u(false)
        }
    };
    var b = function (n, o) {
        var m = (navigator.userAgent.indexOf("Windows NT 5.1") > -1) ? k() : true;
        if (!m) {
            o(false)
        } else {
            h(n, o)
        }
    };
    return {
        isClearTypeOn: k,
        detectFont: h,
        detect: b
    }
})();
qing.registNS("qext.lazy");
qext.lazy.ImageLoad = (function () {
    var k = 0;
    var j = 0;
    var f = [];
    var c = false;
    var m = null;
    var h = function (r, u) {
        var F = u ? 0 : 60;
        var x = u ? 0 : 60;
        var C = {};
        try {
            C = qing.dom.getPosition(r)
        } catch (D) {
            C = {
                left: 0,
                top: 0
            }
        }
        var p = qing.page.getScrollTop();
        var z = qing.page.getScrollLeft();
        var y = qing.page.getViewWidth();
        var w = qing.page.getViewHeight();
        var B = C.left - F,
        q = C.top - x,
        A = C.left + r.offsetWidth + F,
        o = C.top + r.offsetHeight + x,
        t = z,
        E = p,
        n = z + y,
        v = p + w;
        return B <= n && q <= v && A >= t && o >= E
    };
    var b = function (n) {
        if (qing.dom.getAttr(n, "data-loaded") == "1") {
            return true
        }
        return false
    };
    var a = function () {
        if (!c) {
            c = true;
            k = window.setInterval(function () {
                if (f.length === 0) {
                    window.clearInterval(k);
                    c = false;
                    return
                }
                for (var n = 0; n < f.length; n++) {
                    var p = f[n];
                    if (!b(p) && h(p)) {
                        if (qing.dom.getAttr(p, "data-loadfunc") != "1") {
                            qing.dom.setAttr(p, "data-loadfunc", 1);
                            qing.on(p, "load",
                            function (r) {
                                var u = this;
                                qing.dom.setAttr(u, "data-loaded", 1);
                                for (var q = 0; q < f.length; q++) {
                                    var t = f[q];
                                    if (u === t) {
                                        f.splice(q, 1)
                                    }
                                }
                                m && typeof m === "function" && m(u)
                            })
                        }
                        var o = qing.dom.getAttr(p, "data-src") + "";
                        if (o.indexOf("http") > -1) {
                            qing.dom.setAttr(p, "src", o);
                            p.removeAttribute("data-src")
                        }
                    }
                }
            },
            300)
        }
    };
    var l = function (o) {
        var n = false;
        if (!o) {
            o = document.body;
            n = true
        }
        var p = [];
        qing.array.each(o.getElementsByTagName("img"),
        function (r, q) {
            if (qing.dom.getAttr(r, "data-src") && !b(r)) {
                p.push(r)
            }
        });
        if (n) {
            f = p
        } else {
            f = f.concat(p)
        }
        a(f)
    };
    var d = function () {
        qing.array.each(["resize", "scroll", "load"],
        function (n) {
            qing.on(window, n,
            function (o) {
                if (j) {
                    window.clearTimeout(j)
                }
                j = window.setTimeout(function () {
                    j = 0;
                    l()
                },
                20);
                qing.event.stop(o)
            })
        })
    };
    var g = function (n) {
        m = n;
        l();
        d()
    };
    return {
        init: g,
        isVisible: h,
        scanAndDoRender: l
    }
})();